Selaa lähdekoodia

完善出库和退库

hfxc226 2 vuotta sitten
vanhempi
commit
5a7c679da8

+ 16 - 2
src/utils/dict.js

@@ -760,8 +760,22 @@ DictCache.VALUE = {
    * 出库类型
    */
   OUT_STORE_FORM_TYPE: {
-    LINGYONG_CHUKU: 1, // 领用出库
-    TUIHUO_CHUKU: 2 // 退货出库
+    CHUKU_LINGYONG: 201, // 领用出库
+    CHUKU_DIAOBO: 202, // 退货出库
+    CHUKU_DIAOBORe: 203,
+    CHUKU_YF: 204,
+    CHUKU_BF: 205,
+    CHUKU_FY: 206,
+    CHUKU_PK: 207,
+    CHUKU_XS: 208,
+    CHUKU_YP: 209,
+    CHUKU_SBGC: 210,
+    CHUKU_FGLCL: 211,
+    CHUKU_GLCL: 212,
+    CHUKU_FXSCK: 213,
+    CHUKU_QTXS: 214,
+    CHUKU_WLQH: 215,
+    CHUKU_QT: 216
   },
   /**
    * 领用类型

+ 1 - 1
src/views/store/outstoreform/OutStoreFormBackYY.vue

@@ -1,5 +1,5 @@
 <template>
-  <OutStoreFormYY :is-out="false"/>
+  <OutStoreFormYY :is-out="0"/>
 </template>
 
 <script>

+ 3 - 3
src/views/store/outstoreform/OutStoreFormYY.vue

@@ -61,7 +61,7 @@
             <a @click="handleView(record)">查看</a>
             <a-divider v-if="(record.status==0 || record.status == 3)" type="vertical" />
             <a v-if="$auth('store-out-store-forms-edit')&&(record.status==0 || record.status == 3)" @click="handleEdit(record)">修改</a>
-            <a-divider v-if="record.status == 5 || record.status == 4" type="vertical" />
+            <a-divider v-if="record.status == 0 || record.status == 5 || record.status == 4" type="vertical" />
             <a v-if="record.status == 0 || record.status == 4 || record.status == 5" @click="handleViewTicket(record)">打印</a>
             <a-divider v-if="record.status==0" type="vertical" />
             <a-popconfirm v-if="record.status==0" title="是否提交审核?" @confirm="updateStore(record.id)">
@@ -120,8 +120,8 @@ export default {
       default: -1
     },
     isOut: {
-      type: Boolean,
-      default: true
+      type: Number,
+      default: 1
     }
   },
   data () {

+ 9 - 4
src/views/store/outstoreform/modules/BaseFormYY.vue

@@ -57,7 +57,7 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-select  @change="typeChange" v-decorator="['type', {initValue: 1, rules: [{required: true, message: '出库类型不能为空'}]}]" placeholder="请选择">
+            <a-select @change="typeChange" v-decorator="['type', {initValue: 1, rules: [{required: true, message: '出库类型不能为空'}]}]" placeholder="请选择">
               <a-select-option
                 v-for="(label,value) in typeMap"
                 :key="value"
@@ -242,12 +242,12 @@ export default {
           title: '仓库',
           dataIndex: 'storeName'
         },
-        /*{
+        /* {
           title: '备注',
           dataIndex: 'remark',
           width: 150,
           scopedSlots: { customRender: 'remark' }
-        },*/
+        }, */
         {
           title: '操作',
           key: 'action',
@@ -278,11 +278,16 @@ export default {
   },
   created () {
     // 下拉框map
-    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
+    // this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
   },
   methods: {
     base (record) {
       this.visible = true
+      if (record.isOut === 1) {
+        this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
+      } else {
+        this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SPARE_BACK_FORM_TYPE)
+      }
       const params = { deptId: this.user.companyId }
       params.nature = this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI
       queryUsersByParentDeptNatureAll(params).then(res => {

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

@@ -130,7 +130,7 @@ export default {
   },
   created () {
     // 下拉框map
-    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
+    // 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)
   },
@@ -141,6 +141,11 @@ export default {
       this.model = record
       this.data = record.detailList
       const modal = this.$refs.history
+      if (record.isOut === 1) {
+        this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
+      } else {
+        this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SPARE_BACK_FORM_TYPE)
+      }
       modal.base(record, null)
     },
     handleCancel () {

+ 6 - 1
src/views/store/outstoreform/modules/DetailYYAudit.vue

@@ -124,7 +124,7 @@ export default {
   },
   created () {
     // 下拉框map
-    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
+    // 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)
   },
@@ -134,6 +134,11 @@ export default {
       this.modalTitle = '详情'
       this.model = record
       this.data = record.detailList
+      if (record.isOut === 1) {
+        this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
+      } else {
+        this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SPARE_BACK_FORM_TYPE)
+      }
       const modal = this.$refs.history
       modal.base(record, this.task.taskId)
     },

+ 14 - 11
src/views/store/outstoreform/modules/TicketForm.vue

@@ -10,19 +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 v-if="type" v-model="value1">
+        <a-radio-group name="radioGroup" :default-value="1">
           <a-radio :value="1">
-            <a-icon class="check" v-show="value1 ==1" type="check" />成品出库
+            能源装备部
           </a-radio>
           <a-radio :value="2">
-            <a-icon class="check" v-show="value1 ==2" type="check" />材料领用出库
+            生产部
           </a-radio>
-        </a-radio-group>
-        <a-radio-group v-else v-model="value1">
-          <a-radio :value="1">
-            <a-icon class="check" v-show="value1 ==1" type="check" />工程剩余退回
+          <a-radio :value="3">
+            筹建部
           </a-radio>
-        </a-radio-group>-->
+        </a-radio-group>
         <div>单号:{{ model.yyId }}</div>
         <div>日期:{{ model.userTime }}</div>
       </div>
@@ -45,7 +43,7 @@
             <td colspan="1">备注</td>
           </tr>
           <tr v-for="item in model.detailList" :key="item.outId">
-            <td colspan="1">{{ item.spareId }}</td>
+            <td colspan="1">{{ item.no }}</td>
             <td colspan="1">{{ item.spareName }}</td>
             <td colspan="1">{{ item.ggxh }}</td>
             <td colspan="1">{{ item.unit }}</td>
@@ -71,7 +69,7 @@
       </div>
       <div style="display:flex;justify-content:space-between ; margin: 10px auto;width: 1030px;">
         <div >{{ type? '领料':'退料' }}人:{{ model.createdUserName }}</div>
-        <div>部门主管:{{ model.updateUserName }}</div>
+        <div>部门主管:{{ model.applyUserName }}</div>
         <div style="width: 150px;">仓管:</div>
       </div>
     </div>
@@ -103,7 +101,7 @@ export default {
   },
   created () {
     // 下拉框map
-    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
+    // this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
   },
   methods: {
     base (record, type) {
@@ -111,6 +109,11 @@ export default {
       console.log(record)
       this.type = type
       this.model = record
+      if (record.isOut === 1) {
+        this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
+      } else {
+        this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SPARE_BACK_FORM_TYPE)
+      }
     },
     handleCancel (values) {
       this.visible = false