Explorar o código

Merge branch 'develop_yh7' of jianguan-web/jg-ocs-html into pre-release

李磊 %!s(int64=2) %!d(string=hai) anos
pai
achega
833cf686b7

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.1.60",
+    "version": "2.1.62",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 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({

+ 8 - 0
src/api/sales.js

@@ -182,6 +182,14 @@ export const salesDetailTypeExcel = params => {
     responseType: 'blob'
   })
 }
+// 删除全部已选产品
+export const deleteAll = (params) => {
+  return axios({
+    url: `/sales/detail/delete/all `,
+    method: 'post',
+    data: params
+  })
+}
 // 车架号
 export const supperCodeByVin = (params) => {
   return axios({

+ 23 - 0
src/api/salesDetail.js

@@ -215,3 +215,26 @@ export const salesFailExcel = (params) => {
     responseType: 'blob'
   })
 }
+
+// 导出缺货明细
+export const exportStockout = params => {
+  const url = `/sales/detail/exportStockout`
+  delete params.priceType
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+// 导出分组缺货明细
+export const exportGroupStockout = params => {
+  const url = `/sales/detail/exportGroupStockout`
+  delete params.priceType
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

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

@@ -0,0 +1,149 @@
+<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>
+        <div v-if="infoList.length">
+          <div style="min-height:100px;max-height:400px;overflow:auto;">
+            <div class="infoList-item" v-for="item in infoList" :key="item.id">
+              <div><strong>{{ item.createDate }}</strong></div>
+              <div>{{ item.explainInfo }}</div>
+            </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 style="text-align: center;color:#999;padding-top:20px;" v-if="infoList.length==0 && mode == 'view'">
+          暂无发货说明
+        </div>
+      </div>
+      <div class="btn-cont" v-if="mode=='edit'&&showInput">
+        <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.showInput = !this.infoList.length
+        this.spinning = false
+      })
+    },
+    // 取消选择分类
+    handleCancel () {
+      this.isShow = false
+      this.explainInfo = ''
+      this.infoList = []
+      this.showInput = false
+    }
+  },
+  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: 25px 0 10px;
+    }
+    .infoList-item{
+      padding: 10px 0;
+      border-bottom: 1px solid #eee;
+      line-height: 18px;
+    }
+    .info-new{
+      padding: 10px 0;
+    }
+  }
+</style>

+ 55 - 16
src/views/salesManagement/pushOrderManagement/list.vue

@@ -64,6 +64,17 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="对单状态">
+                  <v-select
+                    v-model="queryParam.checkStatus"
+                    ref="printStatus"
+                    id="pushOrder-printStatus"
+                    code="CHECK_STATUS"
+                    placeholder="请选择对单状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="pushOrder-subarea" v-model="queryParam.subareaSn"></subarea>
@@ -93,7 +104,7 @@
       <!-- alert -->
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
-          下推总单数::<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
+          下推总单数:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
           下推总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
           <span v-if="$hasPermissions('B_isShowPrice')">下推总金额:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? totalData.totalAmount : '--' }}</strong>元;</span>
         </div>
@@ -107,7 +118,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ y:tableHeight, x:1800 }"
+        :scroll="{ y:tableHeight, x:1950 }"
         :defaultLoadData="false"
         bordered>
         <!-- 销售单号 -->
@@ -120,30 +131,44 @@
           <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">
-          <a-button
-            size="small"
-            type="link"
-            class="button-warning"
-            :loading="!!tipData"
-            v-if="record.printStatus=='UNABLE_PRINT'&&record.voidFlag=='0'&&$hasPermissions('B_UNABLE_PRINT')"
-            @click="handlePrint(record)"
-          >允许备货打印</a-button>
-          <span v-else>--</span>
+          <div>
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              :loading="!!tipData"
+              v-if="(record.printStatus=='UNABLE_PRINT'||record.printStatus=='CANCEL_PRINT')&&record.voidFlag=='0'&&$hasPermissions('B_UNABLE_PRINT')"
+              @click="handlePrint(record,1)"
+            >允许打印</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              :loading="!!tipData"
+              v-if="record.printStatus=='UNABLE_PRINT'&&record.voidFlag=='0'&&$hasPermissions('B_CANSEL_PRINT')"
+              @click="handlePrint(record,0)"
+            >取消打印</a-button>
+          </div>
         </template>
       </s-table>
 
       <!-- 操作提示 -->
       <commonModal modalTit="操作提示" :openModal="showTipModal" @cancel="canselModal" @ok="updatePrintStatus">
         <div style="text-align: center;">
-          <div style="margin-bottom: 15px;font-size: 14px;"><strong>确认允许此单进行备货打印吗?</strong></div>
+          <div style="margin-bottom: 15px;font-size: 14px;"><strong>{{ tipData&&tipData.printType==1?'确认允许此单进行备货打印吗?':'确认此单取消备货打印吗?' }}</strong></div>
           <div style="line-height: 24px;">
             <div>备货单号:{{ tipData&&tipData.dispatchBillNo }}</div>
             <div>客户名称:{{ tipData&&tipData.buyerName }}</div>
           </div>
         </div>
       </commonModal>
+
       <!-- 查看销售单或备货单详情 -->
       <commonModal
         modalTit="销售单详情"
@@ -154,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>
@@ -169,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: [
@@ -198,7 +227,8 @@ export default {
         subareaSn: undefined,
         voidFlag: undefined,
         shippingAddrProvinceSn: undefined,
-        printStatus: undefined
+        printStatus: undefined,
+        checkStatus: undefined
       },
       totalData: {
         totalAmount: 0,
@@ -239,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 : '--') } },
@@ -281,17 +312,24 @@ export default {
         this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
       }
     },
+    // 查看发货说明
+    handleExplainInfo (row) {
+      this.tipData = row
+      this.showInfoModal = true
+    },
     // 允许备货打印
-    handlePrint (row) {
+    handlePrint (row, type) {
       this.tipData = row
+      this.tipData.printType = type
       this.showTipModal = true
     },
     canselModal () {
       this.tipData = null
       this.showTipModal = false
+      this.showInfoModal = false
     },
     updatePrintStatus () {
-      dispatchPrintStatus({ dispatchBillSn: this.tipData.dispatchBillSn, printStatus: 'NO_PRINT' }).then(res => {
+      dispatchPrintStatus({ dispatchBillSn: this.tipData.dispatchBillSn, printStatus: this.tipData && this.tipData.printType == 1 ? 'NO_PRINT' : 'CANCEL_PRINT' }).then(res => {
         if (res.status == 200) {
           this.canselModal()
           this.$message.info(res.message)
@@ -315,6 +353,7 @@ export default {
       this.queryParam.subareaSn = undefined
       this.queryParam.shippingAddrProvinceSn = undefined
       this.queryParam.printStatus = undefined
+      this.queryParam.checkStatus = undefined
       this.$refs.table.refresh(true)
     },
     pageInit () {

+ 50 - 4
src/views/salesManagement/salesQuery/edit.vue

@@ -66,13 +66,29 @@
               </a-form>
               <div style="position: absolute;right: 0;top: 3px;">
                 <span>已选{{ selectTotal }}项</span>
-                <a-button
+                <!-- <a-button
                   style="margin:0 15px;"
                   size="small"
                   type="danger"
                   class="button-info"
                   id="salesEdit-plDel-btn"
-                  @click="handleBatchDel">批量删除</a-button>
+                  @click="handleBatchDel">批量删除</a-button> -->
+                <a-dropdown>
+                  <a-menu slot="overlay" @click="handleMenuClick">
+                    <a-menu-item key="1">
+                      删除已选项
+                    </a-menu-item>
+                    <a-menu-item key="2">
+                      全部删除
+                    </a-menu-item>
+                  </a-menu>
+                  <a-button
+                    size="small"
+                    style="margin:0 15px;"
+                    type="danger"
+                    class="button-info"
+                    id="salesEdit-plDel-btn"> 批量删除 <a-icon type="down" /> </a-button>
+                </a-dropdown>
                 <a-button
                   size="small"
                   type="primary"
@@ -207,7 +223,7 @@ import queryPart from './queryPart.vue'
 import queryPromotable from './queryPromotable.vue'
 import ChooseActive from './chooseActive.vue'
 import ImportGuideModal from './importGuideModal.vue'
-import { salesDetailBySn, salesWriteSubmit, getPromoacActiveList } from '@/api/sales'
+import { salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll } from '@/api/sales'
 import { salesDetailStockList, salesDetailInsert, salesDetailUpdateQty, salesDetailDel, salesDetailBatchDel, salesDetailDelAll, addPromoGoods, salesBatchInsert } from '@/api/salesDetail'
 export default {
   name: 'SalesEdit',
@@ -282,15 +298,45 @@ export default {
     }
   },
   methods: {
+    handleMenuClick (e) {
+      if (e.key == 1) { // 删除已选项
+        this.handleBatchDel()
+      } else {
+        this.handleBatchDelAll()
+      }
+    },
     // 表格选中项
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
+    handleBatchDelAll () {
+      const _this = this
+      if (_this.dataSource.length == 0) {
+        _this.$message.warning('暂无可删除的已选产品!')
+        return
+      }
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除全部已选产品吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          deleteAll({ salesBillSn: _this.productForm.salesBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.resetSearchForm(true)
+              _this.$refs.promotable.resetCurForm()
+              _this.$message.success(res.message)
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
     // 批量删除已选产品
     handleBatchDel () {
       const _this = this
       if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
-        _this.$message.warning('请在选择要删除的产品后再进行批量操作!')
+        _this.$message.warning('请选择要删除的产品后再进行批量操作!')
         return
       }
       const obj = []

+ 45 - 6
src/views/salesManagement/salesQuery/stockOutDetailModal.vue

@@ -28,15 +28,29 @@
         bordered>
       </s-table>
       <div class="btn-cont" style="padding:20px 20px 0;text-align: center;">
-        <a-button @click="isShow=false">关闭</a-button>
-      </div>
+        <!-- <a-button @click="isShow=false">关闭</a-button> -->
+        <a-button
+          class="button-warning"
+          type="primary"
+          @click="handleExport"
+          :disabled="disabled"
+          :loading="exportLoading"
+          id="allocateBillList-export">导出Excel</a-button>
+        <a-button
+          style="margin-left: 5px"
+          @click="handleClassifyExport"
+          :disabled="disabled"
+          :loading="exportClassifyLoading"
+          id="allocateBillList-export">分类导出Excel</a-button>
+        </a-button></div>
     </a-spin>
   </a-modal>
 </template>
 
 <script>
 import { STable } from '@/components'
-import { salesStockoutDetail } from '@/api/salesDetail'
+import { salesStockoutDetail, exportStockout, exportGroupStockout } from '@/api/salesDetail'
+import { hdExportExcel } from '@/libs/exportExcel'
 export default {
   name: 'StockOutDetail',
   components: { STable },
@@ -60,6 +74,9 @@ export default {
     return {
       spinning: false,
       isShow: this.openModal,
+      disabled: false,
+      exportLoading: false,
+      exportClassifyLoading: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -75,6 +92,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
+        this.disabled = true
         delete parameter.tableId
         delete parameter.index
         return salesStockoutDetail({ isOos: 1, salesBillSn: this.salesBillSn }).then(res => {
@@ -93,6 +111,30 @@ export default {
       }
     }
   },
+  methods: {
+    handleExport () {
+      const _this = this
+      _this.exportLoading = true
+      _this.disabled = true
+      _this.spinning = true
+      hdExportExcel(exportStockout, { salesBillSn: _this.salesBillSn }, '销售单缺货产品导出', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.disabled = false
+      })
+    },
+    handleClassifyExport () {
+      const _this = this
+      _this.exportClassifyLoading = true
+      _this.disabled = true
+      _this.spinning = true
+      hdExportExcel(exportGroupStockout, { isOos: 1, salesBillSn: _this.salesBillSn }, '销售单缺货产品分类导出', function () {
+        _this.exportClassifyLoading = false
+        _this.spinning = false
+        _this.disabled = false
+      })
+    }
+  },
   watch: {
     openModal (nVal, oVal) {
       this.isShow = nVal
@@ -106,9 +148,6 @@ export default {
           this.$refs.table.refresh()
         })
       }
-    },
-    itemSn (nVal, oVal) {
-
     }
   }
 }

+ 56 - 5
src/views/salesManagement/stockPrint/list.vue

@@ -121,6 +121,16 @@
             <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 v-if="record.explainInfo" class="link-bule" @click="handleExplainInfo(record)" :title="record.explainInfo">{{ record.explainInfo||'--' }}</span>
+            <span v-else>--</span>
+          </template>
+          <!-- 备货打印状态 -->
+          <template slot="printStatus" slot-scope="text, record">
+            <span v-if="record.printStatus=='NO_PRINT'&&$hasPermissions('B_noPrintStatus')" class="link-bule" @click="handlePrintStatus(record)">{{ record.printStatusDictValue }}</span>
+            <span v-else>{{ record.printStatusDictValue }}</span>
+          </template>
           <div slot="costTitle">
             <a-tooltip placement="top">
               <template slot="title">
@@ -163,6 +173,18 @@
           <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
           <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
         </commonModal>
+        <!-- 操作提示 -->
+        <commonModal modalTit="操作提示" okText="暂不打印" :openModal="showPrintModal" @cancel="canselModal" @ok="updatePrintStatus">
+          <div style="text-align: center;">
+            <div style="margin-bottom: 15px;font-size: 14px;">如需将打印状态回退至<strong>【暂不打印】</strong>,请点击下方按钮</div>
+            <div style="line-height: 24px;">
+              <div>备货单号:{{ tipData&&tipData.dispatchBillNo }}</div>
+              <div>客户名称:{{ tipData&&tipData.buyerName }}</div>
+            </div>
+          </div>
+        </commonModal>
+        <!-- 发货说明 -->
+        <explainInfoModal mode="view" :rowData="tipData" :openModal="showInfoModal" @close="canselModal"></explainInfoModal>
       </a-spin>
     </a-card>
   </div>
@@ -180,12 +202,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 { dispatchlList, dispatchDetailPrint } from '@/api/dispatch'
+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,
@@ -230,7 +253,10 @@ export default {
           this.spinning = false
           return data
         })
-      }
+      },
+      tipData: null,
+      showPrintModal: false,
+      showInfoModal: false
     }
   },
   computed: {
@@ -240,7 +266,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 : '--') } },
@@ -251,7 +278,7 @@ export default {
         // { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备货打印状态', width: '100px', align: 'center', scopedSlots: { customRender: 'printStatus' } },
         { title: '允许打印时间', dataIndex: 'allowPrintTime', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印次数', dataIndex: 'stockUpPrintTimes', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '100px', align: 'center', fixed: 'right' }
@@ -333,6 +360,30 @@ export default {
         billSn: row.dispatchBillSn
       })
     },
+    // 允许备货打印
+    handlePrintStatus (row) {
+      this.tipData = row
+      this.showPrintModal = true
+    },
+    canselModal () {
+      this.tipData = null
+      this.showPrintModal = false
+      this.showInfoModal = false
+    },
+    updatePrintStatus () {
+      dispatchPrintStatus({ dispatchBillSn: this.tipData.dispatchBillSn, printStatus: 'UNABLE_PRINT' }).then(res => {
+        if (res.status == 200) {
+          this.canselModal()
+          this.$message.info(res.message)
+          this.$refs.table.refresh()
+        }
+      })
+    },
+    // 查看发货说明
+    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)

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.0.215:8602/ocs-admin',
+        target: 'http://192.168.0.183:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  Á·Ï°
-        target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
+        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
         ws: false,
         changeOrigin: true,
         pathRewrite: {