lilei 2 роки тому
батько
коміт
7500d89e36

+ 1 - 1
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -85,7 +85,7 @@ export default {
       rules: {
         buyerSn: [ { required: true, message: '请选择客户', trigger: ['change', 'blur'] } ],
         settleStyleSn: [ { required: true, message: '请选择支付方式', trigger: ['change', 'blur'] } ],
-        consigneeTel: [ { required: true, message: '收货人手机号码不能为空', trigger: ['change', 'blur'] } ]
+        consigneeTel: [ { required: true, message: '请选择收货地址', trigger: ['change', 'blur'] } ]
       },
       addressVal: '选择地址', //  选择地址/更换地址
       chooseAddr: '', //  当前已选地址信息

+ 2 - 0
src/views/salesManagement/salesQuery/detail.vue

@@ -354,10 +354,12 @@ export default {
         dispatchBill: data
       }
       this.spinningAudit = true
+      this.spinning = true
       salesWriteAuditPush(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.spinningAudit = false
+          this.spinning = false
           //  关闭详情跳列表
           this.handleBack()
         }

+ 38 - 6
src/views/salesManagement/salesQuery/list.vue

@@ -211,7 +211,6 @@
               size="small"
               type="link"
               class="button-warning"
-              :loading="!!tipData"
               v-if="record.printStatus=='UNABLE_PRINT'"
               @click="handlePrint(record)"
             >允许备货打印</a-button>
@@ -222,7 +221,7 @@
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <!-- 操作提示 -->
-    <commonModal modalTit="操作提示" :openModal="showTipModal" @cancel="canselModal" @ok="updatePrintStatus">
+    <commonModal modalTit="操作提示" :width="this.tipData&&this.tipData.length == 1?'500px':'800px'" :openModal="showTipModal" @cancel="canselModal" @ok="updatePrintStatus">
       <div style="text-align: center;" v-if="this.tipData&&this.tipData.length">
         <div style="margin-bottom: 15px;font-size: 14px;"><strong>确认允许此单进行备货打印吗?</strong></div>
         <div style="line-height: 24px;" v-if="this.tipData.length == 1">
@@ -230,7 +229,12 @@
           <div>客户名称:{{ tipData[0]&&tipData[0].buyerName }}</div>
         </div>
         <div v-else>
-
+          <a-table
+            :row-selection="{ selectedRowKeys: selectedRowKeys,onChange: onSelectChange, getCheckboxProps: record => ({ props: { disabled: record.printStatus!=='UNABLE_PRINT' }})}"
+            :columns="bhColumns"
+            :data-source="tipData"
+            :pagination="false"
+          />
         </div>
       </div>
     </commonModal>
@@ -321,7 +325,23 @@ export default {
       addrProvinceList: [], //  省下拉
       showCancelNum: false, //  是否显示取消数量和待下推数量
       tipData: null, // 备货单信息
-      tempSalesBillSn: null
+      tempSalesBillSn: null,
+      // 允许备货打印
+      selectedRowKeys: [],
+      bhColumns: [
+        {
+          title: '备货单号',
+          dataIndex: 'dispatchBillNo'
+        },
+        {
+          title: '客户名称',
+          dataIndex: 'buyerName'
+        },
+        {
+          title: '备货打印状态',
+          dataIndex: 'printStatusDictValue'
+        }
+      ]
     }
   },
   computed: {
@@ -329,7 +349,6 @@ export default {
       const arr = [
         { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '7%', align: 'center' },
-        // { title: '采购单号', dataIndex: 'purchaseBillNo', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '提交时间', dataIndex: 'submitDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '总数量', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: '4%', align: 'center' },
@@ -420,6 +439,9 @@ export default {
       this.tempSalesBillSn = row.salesBillSn
       queryBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
         this.tipData = res.data || []
+        this.tipData.map(item => {
+          item.key = item.dispatchBillSn
+        })
         this.showTipModal = true
       })
     },
@@ -427,16 +449,26 @@ export default {
       this.tipData = null
       this.showTipModal = false
       this.tempSalesBillSn = null
+      this.selectedRowKeys = []
+    },
+    onSelectChange (selectedRowKeys) {
+      this.selectedRowKeys = selectedRowKeys
     },
     // 允许备货打印状态
     updatePrintStatus () {
+      const isOne = this.tipData.length
+      if (isOne > 1 && this.selectedRowKeys.length == 0) {
+        this.$message.info('请选择备货单!')
+        return
+      }
       const dispatchBillSnList = []
       this.tipData.map(item => {
         dispatchBillSnList.push(item.dispatchBillSn)
       })
+
       const params = {
         'salesBillSn': this.tempSalesBillSn,
-        'dispatchBillSnList': dispatchBillSnList,
+        'dispatchBillSnList': isOne > 1 ? this.selectedRowKeys : dispatchBillSnList,
         'printStatus': 'NO_PRINT'
       }
       dispatchBatchPrintStatus(params).then(res => {