lilei 3 年之前
父節點
當前提交
8240d50ee0

+ 7 - 0
src/api/dispatch.js

@@ -63,6 +63,13 @@ export const dispatchStockUpAduit = (params) => {
     method: 'post'
   })
 }
+// 允许备货打印
+export const dispatchPrintStatus = (params) => {
+  return axios({
+    url: `/dispatch/updatePrintStatus/${params.dispatchBillSn}/${params.printStatus}`,
+    method: 'get'
+  })
+}
 // 下推 详情  打印
 export const dispatchDetailPrint = params => {
   const url = `/dispatch/print/${params.type}`

+ 12 - 0
src/views/salesManagement/outboundOrder/list.vue

@@ -38,6 +38,17 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="发货状态">
+                  <v-select
+                    v-model="queryParam.state"
+                    ref="state"
+                    id="outboundOrderList-state"
+                    code="OUT_STATE"
+                    placeholder="请选择发货状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="业务单号">
                   <a-input id="outboundOrderList-outBizNo" v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入业务单号"/>
@@ -215,6 +226,7 @@ export default {
         // { title: '售价', dataIndex: 'productTotalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '出库时间', dataIndex: 'outTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库状态', dataIndex: 'stateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货状态', dataIndex: 'stateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限

+ 46 - 35
src/views/salesManagement/pushOrderManagement/list.vue

@@ -42,24 +42,13 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="单据状态">
-                  <v-select
-                    v-model="queryParam.billStatus"
-                    ref="billStatus"
-                    id="pushOrder-billStatus"
-                    code="DISPATCH_BILL_STATUS"
-                    placeholder="请选择单据状态"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="备货打印状态">
                   <v-select
-                    v-model="queryParam.billStatus"
-                    ref="billStatus"
-                    id="pushOrder-billStatus"
-                    code="DISPATCH_BILL_STATUS"
+                    v-model="queryParam.printStatus"
+                    ref="printStatus"
+                    id="pushOrder-printStatus"
+                    code="PRINT_STATUS"
                     placeholder="请选择备货打印状态"
                     allowClear></v-select>
                 </a-form-item>
@@ -107,7 +96,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ y:tableHeight }"
+        :scroll="{ y:tableHeight, x:1800 }"
         :defaultLoadData="false"
         bordered>
         <!-- 销售单号 -->
@@ -126,13 +115,16 @@
             size="small"
             type="link"
             class="button-warning"
+            :loading="!!tipData"
+            v-if="record.printStatus=='UNABLE_PRINT'"
             @click="handlePrint(record)"
           >允许备货打印</a-button>
+          <span v-else>--</span>
         </template>
       </s-table>
 
       <!-- 操作提示 -->
-      <commonModal modalTit="操作提示" :openModal="showTipModal" @cancel="showTipModal=false">
+      <commonModal modalTit="操作提示" :openModal="showTipModal" @cancel="showTipModal=false" @ok="updatePrintStatus">
         <div style="text-align: center;">
           <div style="margin-bottom: 15px;font-size: 14px;"><strong>确认允许此单进行备货打印吗?</strong></div>
           <div style="line-height: 24px;">
@@ -155,7 +147,7 @@ import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import commonModal from '@/views/common/commonModal.vue'
-import { dispatchlList, dispatchQueryCount } from '@/api/dispatch'
+import { dispatchlList, dispatchQueryCount, dispatchPrintStatus } from '@/api/dispatch'
 export default {
   name: 'PushOrderManagementList',
   mixins: [commonMixin],
@@ -175,11 +167,13 @@ export default {
         beginDate: getDate.getThreeMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
         buyerSn: undefined, //  客户名称
+        receiverSn: undefined, // 收货客户
         salesBillNo: '', //  销售单号
         dispatchBillNo: '', //  备货单号
         billStatus: undefined, //  业务状态
         subareaSn: undefined,
-        shippingAddrProvinceSn: undefined
+        shippingAddrProvinceSn: undefined,
+        printStatus: undefined
       },
       totalData: {
         totalAmount: 0,
@@ -215,21 +209,25 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '14%', align: 'center' },
-        { title: '关联销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '14%', align: 'center' },
-        { title: '客户名称', dataIndex: 'buyerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '下推数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '下推金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '备货时间', dataIndex: 'stockUpDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库时间', dataIndex: 'stockOutDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '60px', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '120px', align: 'center' },
+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '120px', align: 'center' },
+        { title: '发货编号', dataIndex: 'sendNo', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品款数', dataIndex: 'totalCategory', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品数量', dataIndex: 'totalQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款打印状态', dataIndex: 'printStatusDictValue1', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备货时间', dataIndex: 'stockUpDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库时间', dataIndex: 'stockOutDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '100px', align: 'center', fixed: 'right' }
       ]
-      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(6, 0, { title: '下推金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-      }
       return arr
     }
   },
@@ -243,7 +241,7 @@ export default {
       this.queryParam.buyerSn = val.key
     },
     shcustChange (val) {
-      this.queryParam.buyerSn = val.key
+      this.queryParam.receiverSn = val.key
     },
     // 详情
     handleDetail (row, type) {
@@ -253,23 +251,36 @@ export default {
         this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
       }
     },
-    // 允许打印
+    // 允许备货打印
     handlePrint (row) {
       this.tipData = row
       this.showTipModal = true
     },
+    updatePrintStatus () {
+      dispatchPrintStatus({ dispatchBillSn: this.tipData.dispatchBillSn, printStatus: 'NO_PRINT' }).then(res => {
+        if (res.status == 200) {
+          this.tipData = null
+          this.showTipModal = false
+          this.$message.info(res.message)
+          this.$refs.table.refresh()
+        }
+      })
+    },
     // 重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.buyerSn = undefined
+      this.queryParam.receiverSn = undefined
       this.$refs.dealerSubareaScopeList.resetForm()
+      this.$refs.shbuyerName.resetForm()
       this.queryParam.salesBillNo = ''
       this.queryParam.dispatchBillNo = ''
       this.queryParam.billStatus = undefined
       this.queryParam.subareaSn = undefined
       this.queryParam.shippingAddrProvinceSn = undefined
+      this.queryParam.printStatus = undefined
       this.$refs.table.refresh(true)
     },
     pageInit () {