whj 1 rok pred
rodič
commit
5f12e74c8d

+ 3 - 1
src/utils/dict.js

@@ -342,7 +342,9 @@ DictCache.TYPE = {
   LONG_YAN_PURCHASE_ORDER_STATUS: 'LONG_YAN_PURCHASE_ORDER_STATUS', // 采购单状态
   GROUP_TYPE: 'GROUP_TYPE', // 计量单位组类别
   SPARE_ADD_UNIT: 'SPARE_ADD_UNIT', // 计量单位
-  ADD_SPARE_STATUS: 'ADD_SPARE_STATUS' //
+  CSR_POLICY: 'CSR_POLICY', // 供需政策
+  PLAN_METHOD: 'PLAN_METHOD', // 计划方法
+  ADD_SPARE_STATUS: 'ADD_SPARE_STATUS' // 存货推送状态
 }
 DictCache.CODE = {
 

+ 54 - 2
src/views/purchase/inventory-list/modules/AddSpareForm.vue

@@ -54,6 +54,7 @@
               style="width: 100%"
               :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
               :treeData="treeData"
+              :replaceFields="{value:'code'}"
               :treeNodeFilterProp="'title'"
               :showSearch="true"
               v-decorator="['cestInvCode', {rules: [{required: true, message: '存货分类编码不能为空'}]}]"
@@ -78,6 +79,54 @@
             </a-select>
           </a-form-item>
         </row-item>
+        <row-item>
+          <a-form-item
+            label="计划方法"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['cestPlanMethod', {rules: [{required: true, message: '计划方法不能为空'}]}]">
+              <a-select-option
+                v-for="(label,value) in planMap"
+                :key="value"
+                :label="label"
+                :value="value">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="供需政策"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['cestSrpolicy', {rules: [{required: true, message: '供需政策不能为空'}]}]">
+              <a-select-option
+                v-for="(label,value) in policyMap"
+                :key="value"
+                :label="label"
+                :value="value">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="成本默认计量单位编码"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['cestCaComUnitCode']">
+              <a-select-option
+                v-for="(label,value) in unitMap"
+                :key="value"
+                :label="label"
+                :value="value">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </row-item>
         <row-item>
           <a-form-item
             label="备注"
@@ -112,13 +161,16 @@ export default {
       treeData: [],
       flagMap: {},
       deptMap: {},
-      unitMap: {}
-
+      unitMap: {},
+      policyMap: {},
+      planMap: {}
     }
   },
   created () {
     this.flagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PROJECT_NEW_AND_OLD)
     this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SPARE_ADD_UNIT)
+    this.policyMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CSR_POLICY)
+    this.planMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PLAN_METHOD)
     getInventoryTree().then(res => {
       // 循环获取样式
       this.treeData = res.data