Kaynağa Gözat

fix: 调拨单增加提审

zh 2 yıl önce
ebeveyn
işleme
6c7416ac26

+ 37 - 31
src/views/supply/transferOrder/transferOrderForm.vue

@@ -38,7 +38,7 @@
     <div v-if="!comDisabled">
       <template v-if="moduleType === 1">
         <el-button type="primary" size="mini" @click="onSubmit('WAIT')">提交</el-button>
-        <el-button size="mini" @click="onSubmit('WAIT')">保存</el-button>
+        <el-button size="mini" @click="onSubmit('SAVE')">保存</el-button>
       </template>
       <template v-else>
         <el-button type="primary" size="mini" @click="onSubmit">编辑</el-button>
@@ -48,7 +48,7 @@
     <!-- 审核 /详情-->
     <div v-if="moduleType === 3 || moduleType === 2">
       <el-button v-if="moduleType === 3" type="primary" size="mini" @click="onExamine('OK')">同意</el-button>
-      <el-button size="mini" @click="onInvoice('WAIT')">撤回</el-button>
+      <el-button size="mini" @click="onInvoice('SAVE')">撤回</el-button>
     </div>
   </div>
 </template>
@@ -283,12 +283,18 @@ export default {
             width: 300
           }
         },
-        ...[this.moduleType === 1 ? {
-          columnAttributes: {
-            label: '可调拨库存数',
-            prop: 'frontStockNum'
-          }
-        } : {}],
+        ...(() => {
+          if (~[1].indexOf(this.moduleType)) {
+            return [{
+              columnAttributes: {
+                label: '可调拨库存数',
+                prop: 'frontStockNum'
+              }}
+            ]
+          }
+          return []
+        })(),
+
         {
           columnAttributes: {
             label: '调拨数量',
@@ -528,109 +534,109 @@ export default {
             prop: 'materialCostType',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '产品名称',
             prop: 'materialName',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '规格型号',
             prop: 'materialSpecification',
             width: 350
           }
-        },{
+        }, {
           columnAttributes: {
             label: '物料类型',
             prop: 'materialType',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '商家编码',
             prop: 'merchantCode',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '商家名称',
             prop: 'merchantName',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '订单号',
             prop: 'orderCode',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '订单时间',
             prop: 'orderDate',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '订单类型',
             prop: 'orderType',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '订单类型细分',
             prop: 'orderTypeDetail',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '收货送货地址',
             prop: 'receiptAddress',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '退货单号',
             prop: 'returnOrderCode',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '补贴结算系数',
             prop: 'subsidyCoefficient',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '嘉贤创建时间',
             prop: 'time',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '费用汇总',
             prop: 'totalCost',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '单价计算',
             prop: 'unitPrice',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '卸货上楼结算系数',
             prop: 'unloadUpstairsCoefficient',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '上楼卸货费用',
             prop: 'unloadUpstairsCost',
             width: 200
           }
-        },{
+        }, {
           columnAttributes: {
             label: '发货仓库编码',
             prop: 'warehouseCode',
@@ -643,7 +649,7 @@ export default {
             prop: 'warehouseName',
             width: 200
           }
-        },
+        }
       ]
     },
     formOutbound() {
@@ -766,7 +772,7 @@ export default {
             prop: 'warehouse',
             width: 200
           }
-        },
+        }
       ]
     },
     formLogisticsData() {
@@ -977,7 +983,7 @@ export default {
       this.$refs.formRef.resetFields()
       this.selectData = []
     },
-    onSubmit(type) {
+    onSubmit(type = null) {
       this.$refs.formRef.validate(valid => {
         if (valid) {
           const params = {
@@ -1002,7 +1008,7 @@ export default {
         }
       })
     },
-    onExamine(type) {
+    onExamine(type = null) {
       examineCustomerTransfer({
         id: this.detailsId,
         status: type
@@ -1011,7 +1017,7 @@ export default {
         this.handlerefreshList()
       })
     },
-    onInvoice(type) {
+    onInvoice(type = null) {
       invoiceCustomerTransfer({
         id: this.detailsId,
         status: type

+ 21 - 3
src/views/supply/transferOrder/transferOrderList.vue

@@ -21,7 +21,7 @@ import import_mixin from '@/components/template/import_mixin.js'
 import add_callback_mixin from '@/components/template/add_callback_mixin.js'
 import Popu from '@/components/template/popu.vue'
 import TransferOrderForm from './transferOrderForm.vue'
-import { getListTransferV2, exportListTransferV2 } from '@/api/transferOrder'
+import { getListTransferV2, exportListTransferV2, invoiceCustomerTransfer } from '@/api/transferOrder'
 import { mapGetters } from 'vuex'
 export default {
   components: { TemplatePage, Popu, TransferOrderForm },
@@ -102,7 +102,7 @@ export default {
             >
               查看
             </el-button>
-            {row.status === 'WAIT' || row.status === 'SAVE' ? (
+            {row.status === 'WAIT' ? (
               <el-button
                 size='mini'
                 type='text'
@@ -115,7 +115,7 @@ export default {
                 审核
               </el-button>
             ) : null}
-            {row.status === 'WAIT' ? (
+            {row.status === 'SAVE' || row.status === 'WAIT'  ? (
               <el-button
                 size='mini'
                 type='text'
@@ -128,6 +128,24 @@ export default {
                 编辑
               </el-button>
             ) : null}
+            {row.status === 'SAVE' ? (
+              <el-popconfirm
+                onOnConfirm={ () => {
+                  invoiceCustomerTransfer({
+                    id: row.id,
+                    status: 'WAIT'
+                  }).then(res => {
+                    this.$successMsg('提审成功')
+                    this.$refs.pageRef.refreshList()
+                  })
+                }}
+                title='是否确定需要提审该项内容?'
+              >
+                <el-button slot='reference' size='mini' type='text'>
+                  提审
+                </el-button>
+              </el-popconfirm>
+            ) : null}
           </div>
         )
       }