whj 1 yıl önce
ebeveyn
işleme
a4da89bb06

+ 1 - 1
src/api/store/sparestore.js

@@ -68,7 +68,7 @@ export function addSpareStore (parameter) {
  */
 export function addSpare (parameter) {
   return axios({
-    url: '/yongyou/add/spare',
+    url: '/yongyou/add/spare/' + parameter.tokenType,
     method: 'POST',
     headers: {
       'Accept': 'application/json',

+ 1 - 0
src/utils/dict.js

@@ -337,6 +337,7 @@ DictCache.TYPE = {
   PLAN_DEFAULT: 'PLAN_DEFAULT', // 计划默认属性
   DRAW_TYPE: 'DRAW_TYPE', // 领料方式
   SUPPLY_TYPE: 'SUPPLY_TYPE', // 供应类型
+  YONG_YOU_DEPT: 'YONG_YOU_DEPT', // 部门
   GROUP_TYPE: 'GROUP_TYPE' // 计量单位组类别
 }
 DictCache.CODE = {

+ 19 - 0
src/views/purchase/purchase-order-page/modules/BaseForm.vue

@@ -78,6 +78,22 @@
               </a-select>
             </a-form-item>
           </a-col>
+          <a-col :sm="20" >
+            <a-form-item
+              label="生产部门"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-select v-decorator="['cdepcode', {rules: [{required: true, message: '厂区不能为空'}]}]" placeholder="请选择">
+                <a-select-option
+                  v-for="(label,value) in deptMap"
+                  :key="value"
+                  :label="label"
+                  :value="parseInt(value)">{{ label }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
           <a-col :sm="20" >
             <a-form-item
               label="项目"
@@ -246,6 +262,7 @@ export default {
       directorMap: [],
       infoNum: 0,
       cptcodeMap: {},
+      deptMap: {},
       confirmLoading: false
     }
   },
@@ -254,6 +271,8 @@ export default {
     this.flagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PROJECT_NEW_AND_OLD)
     this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.LONG_YAN_PURCHASE_TYPE)
     this.cptcodeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.LONG_YAN_PURCHASE_ORDER_PLAN_TYPE)
+    this.deptMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YONG_YOU_DEPT)
+
     this.setTree(1)
   },
   methods: {

+ 29 - 3
src/views/store/sparestore/modules/AddSpareForm.vue

@@ -8,6 +8,22 @@
   >
     <a-form :form="form">
       <row-list :col="2">
+        <row-item>
+          <a-form-item
+            label="厂区"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['tokenType', {rules: [{required: true, message: '厂区不能为空'}]}]">
+              <a-select-option
+                v-for="(label,value) in flagMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </row-item>
         <row-item>
           <a-form-item
             label="存货编码"
@@ -95,8 +111,14 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input
-              v-decorator="['cInvDepCode', {rules: [{required: true, message: '生产部门不能为空'}]}]" />
+            <a-select v-decorator="['cInvDepCode', {rules: [{required: true, message: '生产部门不能为空'}]}]" >
+              <a-select-option
+                v-for="(label,value) in deptMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
           </a-form-item>
         </row-item>
         <row-item>
@@ -472,7 +494,9 @@ export default {
       planDefaultMap: {},
       drawTypeMap: {},
       supplyTypeMap: {},
-      groupTypeMap: {}
+      groupTypeMap: {},
+      flagMap: {},
+      deptMap: {}
 
     }
   },
@@ -482,6 +506,8 @@ export default {
     this.drawTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.DRAW_TYPE)
     this.supplyTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SUPPLY_TYPE)
     this.groupTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.GROUP_TYPE)
+    this.flagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PROJECT_NEW_AND_OLD)
+    this.deptMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YONG_YOU_DEPT)
   },
   methods: {
     base (record) {