lilei 2 tahun lalu
induk
melakukan
e5eb61c012

+ 15 - 0
src/api/dispatch.js

@@ -83,6 +83,21 @@ export const dispatchPrintStatus = (params) => {
     method: 'get'
   })
 }
+// 查询备货说明列表
+export const queryExplainList = (params) => {
+  return axios({
+    url: `/dispatch/queryExplainList/${params.dispatchBillSn}`,
+    method: 'get'
+  })
+}
+// 保存备货说明
+export const saveExplain = (params) => {
+  return axios({
+    url: '/dispatch/saveExplain',
+    data: params,
+    method: 'post'
+  })
+}
 // 批量备货打印
 export const dispatchBatchPrintStatus = (params) => {
   return axios({

+ 142 - 0
src/views/salesManagement/pushOrderManagement/explainInfoModal.vue

@@ -0,0 +1,142 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    class="pushOrderManagement-explainInfo-modal"
+    title="查看发货说明"
+    v-model="isShow"
+    @cancel="handleCancel"
+    :width="600">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div style="min-height:200px;">
+        <div v-if="infoList.length">
+          <div class="infoList-item" v-for="item in infoList" :key="item.id">
+            <div><strong>{{ item.createDate }}</strong></div>
+            <div>{{ item.explainInfo }}</div>
+          </div>
+          <div class="info-new" v-if="!showInput && mode=='edit'">
+            <a-button type="primary" @click="showInput=true" size="small" ghost block>+新增发货说明</a-button>
+          </div>
+        </div>
+        <div v-if="(infoList.length==0 || showInput) && mode=='edit'">
+          <a-input
+            type="textarea"
+            :maxLength="100"
+            :auto-size="{ minRows: 3, maxRows: 5 }"
+            v-model.trim="explainInfo"
+            placeholder="请输入发货说明(最多100字符)"
+            allowClear />
+        </div>
+      </div>
+      <div class="btn-cont" v-if="mode=='edit'">
+        <a-button @click="handleCancel">取消</a-button>
+        <a-button
+          type="primary"
+          @click="handleSave('export')"
+          style="margin-left: 10px;">保存</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { queryExplainList, saveExplain } from '@/api/dispatch'
+export default {
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    rowData: {
+      type: Object,
+      default: function () {
+        return null
+      }
+    },
+    mode: {
+      type: String,
+      default: 'edit'
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      showInput: false,
+      explainInfo: '',
+      infoList: []
+    }
+  },
+  methods: {
+    // 确认
+    handleSave (type) {
+      if (this.explainInfo == '') {
+        this.$message.info('请输入发货说明')
+        return false
+      }
+      this.spinning = true
+      saveExplain({
+        dispatchBillSn: this.rowData.dispatchBillSn,
+        dispatchBillNo: this.rowData.dispatchBillNo,
+        salesBillSn: this.rowData.salesBillSn,
+        salesBillNo: this.rowData.salesBillNo,
+        purchaseBillSn: this.rowData.purchaseBillSn,
+        purchaseBillNo: this.rowData.purchaseBillNo,
+        explainInfo: this.explainInfo
+      }).then(res => {
+        if (res.status == 200) {
+          this.explainInfo = ''
+          this.showInput = false
+          this.getInfo()
+        }
+        this.spinning = false
+      })
+    },
+    getInfo () {
+      this.spinning = true
+      queryExplainList({ dispatchBillSn: this.rowData.dispatchBillSn }).then(res => {
+        this.infoList = res.data || []
+        this.spinning = false
+      })
+    },
+    // 取消选择分类
+    handleCancel () {
+      this.isShow = false
+      this.explainInfo = ''
+      this.infoList = []
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        this.getInfo()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .pushOrderManagement-explainInfo-modal{
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+    .infoList-item{
+      padding: 10px 0;
+      border-bottom: 1px solid #eee;
+      line-height: 18px;
+    }
+    .info-new{
+      padding: 10px 0;
+    }
+  }
+</style>

+ 18 - 2
src/views/salesManagement/pushOrderManagement/list.vue

@@ -118,7 +118,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ y:tableHeight, x:1800 }"
+        :scroll="{ y:tableHeight, x:1950 }"
         :defaultLoadData="false"
         bordered>
         <!-- 销售单号 -->
@@ -131,6 +131,10 @@
           <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
           <span v-else>{{ record.dispatchBillNo }}</span>
         </template>
+        <!-- 发货说明  -->
+        <template slot="explainInfo" slot-scope="text, record">
+          <span class="link-bule" @click="handleExplainInfo(record)" :title="record.explainInfo">{{ record.explainInfo||'--' }}</span>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <div>
@@ -164,6 +168,7 @@
           </div>
         </div>
       </commonModal>
+
       <!-- 查看销售单或备货单详情 -->
       <commonModal
         modalTit="销售单详情"
@@ -174,6 +179,8 @@
         @cancel="showDetailModal = false">
         <salesDetail v-if="showDetailModal" ref="salesDetail" :bizSn="bizSn"></salesDetail>
       </commonModal>
+      <!-- 发货说明 -->
+      <explainInfoModal :rowData="tipData" :openModal="showInfoModal" @close="canselModal"></explainInfoModal>
     </a-spin>
   </a-card>
 </template>
@@ -189,17 +196,19 @@ import Area from '@/views/common/area.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
+import explainInfoModal from './explainInfoModal.vue'
 import { dispatchlList, dispatchQueryCount, dispatchPrintStatus } from '@/api/dispatch'
 export default {
   name: 'PushOrderManagementList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, Area, salesDetail },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, Area, salesDetail, explainInfoModal },
   data () {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       showDetailModal: false,
+      showInfoModal: false,
       bizSn: null,
       tableHeight: 0,
       time: [
@@ -260,6 +269,7 @@ export default {
         { 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: '发货说明', scopedSlots: { customRender: 'explainInfo' }, width: '150px', align: 'center', 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 : '--') } },
@@ -302,6 +312,11 @@ export default {
         this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
       }
     },
+    // 查看发货说明
+    handleExplainInfo (row) {
+      this.tipData = row
+      this.showInfoModal = true
+    },
     // 允许备货打印
     handlePrint (row, type) {
       this.tipData = row
@@ -311,6 +326,7 @@ export default {
     canselModal () {
       this.tipData = null
       this.showTipModal = false
+      this.showInfoModal = false
     },
     updatePrintStatus () {
       dispatchPrintStatus({ dispatchBillSn: this.tipData.dispatchBillSn, printStatus: this.tipData && this.tipData.printType == 1 ? 'NO_PRINT' : 'CANCEL_PRINT' }).then(res => {

+ 18 - 3
src/views/salesManagement/stockPrint/list.vue

@@ -121,6 +121,10 @@
             <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
             <span v-else>{{ record.dispatchBillNo }}</span>
           </template>
+          <!-- 发货说明  -->
+          <template slot="explainInfo" slot-scope="text, record">
+            <span class="link-bule" @click="handleExplainInfo(record)" :title="record.explainInfo">{{ record.explainInfo||'--' }}</span>
+          </template>
           <!-- 备货打印状态 -->
           <template slot="printStatus" slot-scope="text, record">
             <span v-if="record.printStatus=='NO_PRINT'" class="link-bule" @click="handlePrintStatus(record)">{{ record.printStatusDictValue }}</span>
@@ -178,6 +182,8 @@
             </div>
           </div>
         </commonModal>
+        <!-- 发货说明 -->
+        <explainInfoModal mode="view" :rowData="tipData" :openModal="showInfoModal" @close="canselModal"></explainInfoModal>
       </a-spin>
     </a-card>
   </div>
@@ -195,12 +201,13 @@ import recordModal from './recordModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
 import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
+import explainInfoModal from '@/views/salesManagement/pushOrderManagement/explainInfoModal.vue'
 import { dispatchlList, dispatchDetailPrint, dispatchPrintStatus } from '@/api/dispatch'
 import { printFun } from '@/libs/JGPrint.js'
 export default {
   name: 'StockPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, sendTypeModal, recordModal, Area, commonModal, salesDetail, dispatchDetail },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, sendTypeModal, recordModal, Area, commonModal, salesDetail, dispatchDetail, explainInfoModal },
   data () {
     return {
       spinning: false,
@@ -247,7 +254,8 @@ export default {
         })
       },
       tipData: null,
-      showPrintModal: false
+      showPrintModal: false,
+      showInfoModal: false
     }
   },
   computed: {
@@ -257,7 +265,8 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '120px', 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: '70px', align: 'center' },
+        { title: '发货编号', dataIndex: 'sendNo', width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货说明', scopedSlots: { customRender: 'explainInfo' }, width: '150px', align: 'center', 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: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -358,6 +367,7 @@ export default {
     canselModal () {
       this.tipData = null
       this.showPrintModal = false
+      this.showInfoModal = false
     },
     updatePrintStatus () {
       dispatchPrintStatus({ dispatchBillSn: this.tipData.dispatchBillSn, printStatus: 'UNABLE_PRINT' }).then(res => {
@@ -368,6 +378,11 @@ export default {
         }
       })
     },
+    // 查看发货说明
+    handleExplainInfo (row) {
+      this.tipData = row
+      this.showInfoModal = true
+    },
     // 重置
     resetSearchForm () {
       this.time = []

+ 13 - 3
src/views/salesManagement/waitDispatch/dsModal.vue

@@ -42,6 +42,15 @@
               常用:<a-button size="small" v-for="i in 5" @click="setSendNo(i)" type="link">{{ i }}</a-button>
             </div>
           </a-form-model-item>
+          <a-form-model-item label="发货说明">
+            <a-input
+              id="dealerAccountEdit-explainInfo"
+              type="textarea"
+              :maxLength="100"
+              v-model.trim="form.explainInfo"
+              placeholder="请输入发货说明(最多100字符)"
+              allowClear />
+          </a-form-model-item>
           <a-form-model-item label="备货打印" prop="printStatus">
             <a-radio-group v-model="form.printStatus">
               <a-radio value="NO_PRINT">
@@ -100,7 +109,8 @@ export default {
         buyerName: '',
         receiverSn: '',
         receiverName: '',
-        dealerRecevieAddressSn: '' // 地址sn
+        dealerRecevieAddressSn: '', // 地址sn
+        explainInfo: ''
       },
       rules: {
         sendNo: [{ required: true, message: '请输入发货编号', trigger: 'change' }],
@@ -175,7 +185,6 @@ export default {
       this.addressId = data.id || undefined
       this.openAddrModal = false
       // 移除表单项的校验结果
-      console.log(this.form.dealerRecevieAddressSn)
       this.$refs.ruleForm.validateField('dealerRecevieAddressSn')
     },
     //  获取详情
@@ -192,7 +201,8 @@ export default {
         buyerName: '',
         receiverSn: '',
         receiverName: '',
-        dealerRecevieAddressSn: ''
+        dealerRecevieAddressSn: '',
+        explainInfo: ''
       }
       this.$refs.dealerSubareaScopeList.resetForm()
       this.verifyFun(this.addressId)