lilei 1 年間 前
コミット
f039f7a16a

+ 28 - 26
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -72,29 +72,29 @@
       <div style="padding: 10px 12px 0 12px" v-show="outBizSubSn||bizSn">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
-             <a-descriptions size="small" :column="3">
-               <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
-               <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
-               <a-descriptions-item label="备货单号">{{ detailData&&detailData.dispatchBillNo || '--' }}</a-descriptions-item>
-               <a-descriptions-item label="收货客户名称">{{ detailData&&detailData.receiverName || '--' }}</a-descriptions-item>
-               <a-descriptions-item label="发货编号">{{ detailData&&detailData.sendNo || '--' }}</a-descriptions-item>
-               <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
-               <a-descriptions-item label="收货人" v-if="detailData&&detailData.salesBillExtEntity">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
-               <a-descriptions-item label="收货电话" v-if="detailData&&detailData.salesBillExtEntity">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
-               <a-descriptions-item label="收货地址" :span="2" v-if="detailData&&detailData.salesBillExtEntity">
-                 {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrProvinceName || '' }}
-                 {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrCityName || '' }}
-                 {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrCountyName || '' }}
-                 {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddr || '' }}
-               </a-descriptions-item>
-               <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
-               <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
-             </a-descriptions>
+            <a-descriptions size="small" :column="3">
+              <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备货单号">{{ detailData&&detailData.dispatchBillNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货客户名称">{{ detailData&&detailData.receiverName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="发货编号">{{ detailData&&detailData.sendNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货人" v-if="detailData&&detailData.salesBillExtEntity">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货电话" v-if="detailData&&detailData.salesBillExtEntity">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货地址" :span="2" v-if="detailData&&detailData.salesBillExtEntity">
+                {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrProvinceName || '' }}
+                {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrCityName || '' }}
+                {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrCountyName || '' }}
+                {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddr || '' }}
+              </a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
+            </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
       </div>
       <a-card size="small" :bordered="false" class="pages-wrap">
-        <!-- alert -->
+        <!-- 统计信息 -->
         <a-alert type="info" style="margin-bottom: 10px;" v-if="detailData!=null">
           <div slot="message">
             <span v-if="$route.params.type!='stockOut'">
@@ -128,7 +128,7 @@
             <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
             <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge>
           </template>
-           <!-- 销售价 -->
+          <!-- 销售价 -->
           <template slot="price" slot-scope="text, record">
             {{ toThousands(text) }}
             <span v-if="record.promotionFlag=='GIFT'||record.promotionFlag=='DISCOUNT'" title="原价">({{ toThousands(record.origPrice) }})</span>
@@ -221,6 +221,7 @@ export default {
     }
   },
   computed: {
+    // 以下2中状态下不显示打印按钮
     hasNoPrint () {
       return this.detailData && (this.detailData.printStatus == 'UNABLE_PRINT' || this.detailData.printStatus == 'CANCEL_PRINT')
     },
@@ -238,7 +239,7 @@ export default {
         // { title: '本次下推金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_dispatchDetail_salesPrice')) { //  售价权限
-        arr.splice(5, 0, { title: '销售价格', dataIndex: 'price', width: '8%', align: 'right', scopedSlots: { customRender: 'price' }, })
+        arr.splice(5, 0, { title: '销售价格', dataIndex: 'price', width: '8%', align: 'right', scopedSlots: { customRender: 'price' } })
         arr.splice(9, 0, { title: '本次下推金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       if (this.$hasPermissions('B_dispatchDetail_cityPrice')) { //  市级权限
@@ -248,7 +249,7 @@ export default {
     }
   },
   watch: {
-    showDetail(newValue, oldValue) {
+    showDetail (newValue, oldValue) {
       this.getTableHeight()
     }
   },
@@ -257,7 +258,8 @@ export default {
     handleBack () {
       this.$router.push({ name: 'pushOrderManagementList' })
     },
-    getTableHeight(){
+    // 计算表格高度
+    getTableHeight () {
       this.tableHeight = this.outBizSubSn || this.bizSn ? 300 : (window.innerHeight - (this.showDetail ? 403 : 265))
     },
     //  详情
@@ -323,11 +325,11 @@ export default {
           params.type = params.type + '_STACK_PLACE'
         }
         // 原厂编码
-        if(obj.origCode == 1){
+        if (obj.origCode == 1) {
           params.type = params.type + '_ORIG_CODE'
         }
         // 装箱号
-        if(obj.packNo == 1){
+        if (obj.packNo == 1) {
           params.type = params.type + '_PACK_NUM'
         }
         printBase64Fun(
@@ -335,7 +337,7 @@ export default {
           Object.assign(params, obj || {}),
           type,
           taskName,
-          () => { 
+          () => {
             _this.spinning = false
             _this.$store.state.app.curActionPermission = ''
           },

+ 52 - 40
src/views/salesManagement/pushOrderManagement/list.vue

@@ -68,27 +68,27 @@
                 <a-form-item label="对单状态">
                   <v-select
                     v-model="queryParam.checkStatus"
-                    ref="printStatus"
-                    id="pushOrder-printStatus"
+                    ref="checkStatus"
+                    id="pushOrder-checkStatus"
                     code="CHECK_STATUS"
                     placeholder="请选择对单状态"
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="所在区域">
+                <a-form-item label="所在区域">
                   <subarea id="pushOrder-subarea" ref="subarea" @change="subareaChange"></subarea>
-                </a-form-model-item>
+                </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
+                <a-form-item label="地区" prop="shippingAddrProvinceSn">
                   <Area id="pushOrder-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
-                </a-form-model-item>
+                </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24" v-show="isShowWarehouse">
-                <a-form-model-item label="出库仓库">
+                <a-form-item label="出库仓库">
                   <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
-                </a-form-model-item>
+                </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
                 <a-form-item label="客服">
@@ -110,9 +110,9 @@
         </a-form>
       </div>
     </a-card>
-
     <a-card size="small" :bordered="false" class="pushOrder-wrap">
       <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 统计 -->
         <div class="tongji-bar" style="margin-bottom:10px">
           下推总单数:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
           下推总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
@@ -167,7 +167,7 @@
           </template>
         </s-table>
 
-        <!-- 操作提示 -->
+        <!-- 允许此单进行备货打印操作提示 -->
         <commonModal modalTit="操作提示" :openModal="showTipModal" @cancel="canselModal" @ok="updatePrintStatus">
           <div style="display:flex;flex-direction: column;align-items: center;">
             <div style="margin-bottom: 15px;font-size: 14px;"><strong>{{ tipData&&tipData.printType==1?'确认允许此单进行备货打印吗?':'确认此单取消备货打印吗?' }}</strong></div>
@@ -188,6 +188,7 @@
           @cancel="closeDetailModal">
           <salesDetail v-if="showDetailModal" ref="salesDetail" :bizSn="bizSn"></salesDetail>
         </commonModal>
+
         <!-- 发货说明 -->
         <explainInfoModal v-drag :rowData="tipData" :openModal="showInfoModal" @close="canselModal"></explainInfoModal>
       </a-spin>
@@ -219,41 +220,41 @@ export default {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
-      showDetailModal: false,
-      showInfoModal: false,
-      bizSn: null,
-      tableHeight: 0,
+      showDetailModal: false, // 销售单详情弹框
+      showInfoModal: false, // 发货说明弹框
+      bizSn: null, // 当前操作的销售单sn
+      tableHeight: 0, // 表格高度
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
       ],
       // 查询参数
       queryParam: {
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: getDate.getThreeMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
         buyerSn: undefined, //  客户名称
         receiverSn: undefined, // 收货客户
         salesBillNo: '', //  销售单号
         dispatchBillNo: '', //  备货单号
         billStatus: undefined, //  业务状态
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined // 分区
         },
-        voidFlag: undefined,
-        shippingAddrProvinceSn: undefined,
-        printStatus: undefined,
-        checkStatus: undefined,
-        warehouseSn: undefined,
-        bizUserSn: undefined
+        voidFlag: undefined, // 单据状态
+        shippingAddrProvinceSn: undefined, // 地区 省
+        printStatus: undefined, // 备货打印状态
+        checkStatus: undefined, // 对单状态
+        warehouseSn: undefined, // 仓库
+        bizUserSn: undefined // 客服
       },
-      totalData: {
-        totalAmount: 0,
-        totalQty: 0,
-        totalRecord: 0
+      totalData: { // 统计数据
+        totalAmount: 0, // 总金额
+        totalQty: 0, // 总数量
+        totalRecord: 0 // 总条数
       },
-      showTipModal: false,
-      tipData: null,
+      showTipModal: false, // 确认弹框操作提示
+      tipData: null, // 发货说明 数据
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -292,7 +293,6 @@ export default {
         { title: '出库仓库', dataIndex: 'warehouseName', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'totalCategory', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品数量', dataIndex: 'totalQty', width: '80px', 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: 'settlePrintStateDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
@@ -303,25 +303,33 @@ export default {
         { 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('M_pushOrderManagementList_salesPrice')) { //  售价权限
+      //  售价权限
+      if (this.$hasPermissions('M_pushOrderManagementList_salesPrice')) {
         arr.splice(10, 0, { title: '总售价', dataIndex: 'totalAmount', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
     }
   },
   methods: {
-    //  时间  change
+    //  选择时间
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
+    // 客户名称
     custChange (val) {
       this.queryParam.buyerSn = val.key
     },
+    // 选择区域
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    // 收货客户名称
     shcustChange (val) {
       this.queryParam.receiverSn = val.key
     },
-    // 详情
+    // 详情,type 0 销售订单 1 销售退单
     handleDetail (row, type) {
       if (type == 0) {
         this.$store.state.app.curActionPermission = 'B_salesDetail'
@@ -331,6 +339,7 @@ export default {
         this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
       }
     },
+    // 详情弹框关闭
     closeDetailModal () {
       this.showDetailModal = false
       this.$store.state.app.curActionPermission = ''
@@ -346,13 +355,18 @@ export default {
       this.tipData.printType = type
       this.showTipModal = true
     },
+    // 发货说明弹框关闭
     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 => {
+      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)
@@ -360,11 +374,7 @@ export default {
         }
       })
     },
-    subareaChange (val) {
-      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
-      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
-    },
-    // 重置
+    // 重置查询
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
@@ -390,12 +400,14 @@ export default {
       }
       this.$refs.table.refresh(true)
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 230

+ 8 - 6
src/views/salesManagement/pushOrderManagement/sendTypeModal.vue

@@ -94,15 +94,15 @@ export default {
       type: Boolean,
       default: false
     },
-    outBizSubSn: {
+    outBizSubSn: { // 单据sn
       type: [Number, String],
       default: ''
     },
-    hasNoPrint: {
+    hasNoPrint: { // 是否显示打印按钮
       type: Boolean,
       default: false
     },
-    nowType: {
+    nowType: { // 操作类型,打印or导出
       type: String,
       default: 'print'
     }
@@ -110,12 +110,13 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      form: {
+      form: { // 打印、导出选项
         id: 'all',
         orderBy: undefined,
         origCode: '0',
         packNo: '1'
       },
+      // 规则校验
       rules: {
         id: [{ required: true, message: '请选择产品分类', trigger: 'change' }],
         orderBy: [{ required: true, message: '请选择货位编号', trigger: 'change' }],
@@ -127,8 +128,8 @@ export default {
         wrapperCol: { span: 15 }
       },
       spinning: false,
-      typeList: [],
-      detailData: null
+      typeList: [], // 产品分类
+      detailData: null // 详细信息
     }
   },
   methods: {
@@ -181,6 +182,7 @@ export default {
         }
       })
     },
+    // 赋值
     setData (data, dispatchBillSn) {
       this.detailData = data
       this.getTypeData(dispatchBillSn)