Преглед изворни кода

仓库:备注+申请部门

hfxc226 пре 2 година
родитељ
комит
224b2cc366

+ 1 - 0
src/utils/dict.js

@@ -125,6 +125,7 @@ DictCache.TYPE = {
   SB_CHECK_GOOD_TYPE: 'SB_CHECK_GOOD_TYPE', // 验收物品类型:设备,备件,物资
   SB_CHECK_FORM_STATUS: 'SB_CHECK_FORM_STATUS', // 验收状态
   OUT_STORE_FORM_TYPE: 'OUT_STORE_FORM_TYPE', // 出库类型
+  OUT_STORE_FORM_DEPT_CODE: 'OUT_STORE_FORM_DEPT_CODE', // 用友对应的部门code
   FEE_FORM_TYPE: 'FEE_FORM_TYPE', // 成本归属
   OUT_STORE_FORM_STATUS: 'OUT_STORE_FORM_STATUS', // 出库状态
   SPARE_PICK_FORM_TYPE: 'SPARE_PICK_FORM_TYPE', // 领用类型,

+ 13 - 0
src/views/store/outstoreform/OutStoreFormYY.vue

@@ -145,6 +145,10 @@ export default {
           title: '出库单号',
           dataIndex: 'outNo'
         },
+        {
+          title: '用友单号',
+          dataIndex: 'yyId'
+        },
         {
           title: '出库类型',
           dataIndex: 'type',
@@ -152,6 +156,13 @@ export default {
             return this.BaseTool.Object.getField(this.typeMap, text)
           }
         },
+        {
+          title: '申请部门',
+          dataIndex: 'applyDept',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.deptYYMap, text)
+          }
+        },
         {
           title: '状态',
           dataIndex: 'status',
@@ -175,6 +186,7 @@ export default {
       ],
       // 下拉框map
       typeMap: {},
+      deptYYMap: {},
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         parameter = {
@@ -205,6 +217,7 @@ export default {
   },
   created () {
     // 下拉框map
+    this.deptYYMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE)
     if (this.outFlag === 1) {
       this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
     } else {

+ 23 - 2
src/views/store/outstoreform/modules/BaseFormYY.vue

@@ -51,6 +51,22 @@
             </a-tree-select>
           </a-form-item>
         </a-col>-->
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="申请部门"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select @change="typeChange" v-decorator="['applyDept', {initValue: 1, rules: [{required: true, message: '申请部门不能为空'}]}]" placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in deptYYMap"
+                :key="value"
+                :label="label"
+                :value="value">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
             label="出库类型"
@@ -216,6 +232,7 @@ export default {
       storeId: null,
       // 下拉框map
       typeMap: {},
+      deptYYMap: {},
       // 表头
       columns: [
         {
@@ -298,13 +315,13 @@ export default {
     // 下拉框map
     this.getSbPositions()
     this.feeFromMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FEE_FORM_TYPE)
+    this.deptYYMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE)
     // this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
   },
   methods: {
     base (record, model) {
       this.visible = true
       this.model = model
-      console.log(model)
       this.outFlag = record.outFlag
       if (record.outFlag === 1) {
         this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
@@ -346,10 +363,12 @@ export default {
           'id',
           'outNo',
           'userId',
+          'applyDept',
           'userTime',
           'storeId',
           'storeName',
           'pickId',
+          'feeFrom',
           'pickNo',
           'type',
           'remark'
@@ -372,7 +391,9 @@ export default {
         }
         values.outFlag = this.outFlag
         values.detailList = this.data
-        values.pickId = this.model.id
+        if (this.model != null) {
+          values.pickId = this.model.id
+        }
         values.userTime = BaseTool.Date.formatter(values.userTime, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
         // 日期处理
         if (this.BaseTool.String.isBlank(values.id)) {

+ 5 - 1
src/views/store/outstoreform/modules/DetailYY.vue

@@ -12,14 +12,15 @@
     </a-row>
     <detail-list title="" :col="3">
       <detail-list-item term="单号">{{ model.outNo }}</detail-list-item>
+      <detail-list-item term="用友单号">{{ model.yyId }}</detail-list-item>
       <detail-list-item term="类型">{{ BaseTool.Object.getField(typeMap,model.type) }}</detail-list-item>
+      <detail-list-item term="申请部门">{{ BaseTool.Object.getField(deptYYMap,model.applyDept) }}</detail-list-item>
       <detail-list-item term="仓库">{{ model.storeName }}</detail-list-item>
       <detail-list-item term="状态"><badge :text="BaseTool.Object.getField(statusMap,model.status)" :status="statusMap[model.status]"/></detail-list-item>
       <detail-list-item term="是否出库"><badge :text="BaseTool.Object.getField(yesNoMap,model.outFlag)" :status="statusMap[model.status]"/></detail-list-item>
       <detail-list-item term="创建人">{{ model.createdUserName }}</detail-list-item>
       <detail-list-item term="更新人">{{ model.updateUserName }}</detail-list-item>
       <detail-list-item term="更新日期">{{ model.updateTime }}</detail-list-item>
-      <detail-list-item term="用友单号">{{ model.yyId }}</detail-list-item>
       <detail-list-item term="用友返回信息">{{ model.yyMessage }}</detail-list-item>
     </detail-list>
     <detail-list title="" :col="1">
@@ -59,10 +60,12 @@ export default {
       // 下拉框map
       typeMap: {},
       statusMap: {},
+      deptYYMap: {},
       yesNoMap: {},
       model: {
         'outNo': null,
         'type': null,
+        'applyDept': null,
         'yyId': null,
         'yyMessage': null,
         'pickId': null,
@@ -132,6 +135,7 @@ export default {
     // 下拉框map
     // this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_STATUS)
+    this.deptYYMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE)
     this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
   },
   methods: {

+ 5 - 0
src/views/store/outstoreform/modules/DetailYYAudit.vue

@@ -12,7 +12,9 @@
     </a-row>
     <detail-list title="" :col="3">
       <detail-list-item term="单号">{{ model.outNo }}</detail-list-item>
+      <detail-list-item term="用友单号">{{ model.yyId }}</detail-list-item>
       <detail-list-item term="类型">{{ BaseTool.Object.getField(typeMap,model.type) }}</detail-list-item>
+      <detail-list-item term="申请部门">{{ BaseTool.Object.getField(deptYYMap,model.applyDept) }}</detail-list-item>
       <detail-list-item term="仓库">{{ model.storeName }}</detail-list-item>
       <detail-list-item term="状态"><badge :text="BaseTool.Object.getField(statusMap,model.status)" :status="statusMap[model.status]"/></detail-list-item>
       <detail-list-item term="是否出库"><badge :text="BaseTool.Object.getField(yesNoMap,model.outFlag)" :status="statusMap[model.status]"/></detail-list-item>
@@ -64,9 +66,11 @@ export default {
       typeMap: {},
       statusMap: {},
       yesNoMap: {},
+      deptYYMap: {},
       model: {
         'outNo': null,
         'type': null,
+        'applyDept': null,
         'pickId': null,
         'storeId': null,
         'storeName': null,
@@ -127,6 +131,7 @@ export default {
     // this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_STATUS)
     this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
+    this.deptYYMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE)
   },
   methods: {
     base (record) {

+ 6 - 6
src/views/store/outstoreform/modules/TicketForm.vue

@@ -10,17 +10,17 @@
         <div style="font-size:26px;font-weight:700">{{ BaseTool.Object.getField(typeMap,model.type) }}</div>
       </div>
       <div style="display:flex;justify-content:space-between; margin: 10px auto;width: 1030px;">
-        <a-radio-group name="radioGroup" v-model="value1">
+        <a-radio-group name="radioGroup">
           <a-radio :value="1">
-            <a-icon class="check" v-show="value1 ==1" type="check" />
-            能源装备部
+            <a-icon class="check" v-show="model.applyDept === '13'" type="check" />
+            备部
           </a-radio>
           <a-radio :value="2">
-            <a-icon class="check" v-show="value1 ==2" type="check" />
+            <a-icon class="check" v-show="model.applyDept === '19'" type="check" />
             生产部
           </a-radio>
           <a-radio :value="3">
-            <a-icon class="check" v-show="value1 ==3" type="check" />
+            <a-icon class="check" v-show="model.applyDept === '09'" type="check" />
             筹建部
           </a-radio>
         </a-radio-group>
@@ -48,7 +48,7 @@
             <td colspan="1">数量</td>
             <td colspan="1">备注</td>
           </tr>
-          <tr v-for="item in model.detailList" :key="item.outId">
+          <tr v-for="item in model.detailList" :key="item.id">
             <td colspan="1">{{ item.no }}</td>
             <td colspan="1">{{ item.spareName }}</td>
             <td colspan="1">{{ item.ggxh }}</td>