Browse Source

Merge branch 'develop_yh22' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh22

lilei 1 year ago
parent
commit
ff5febd692

+ 86 - 53
src/views/salesManagement/salesAllocationList/salesList.vue

@@ -1,6 +1,6 @@
 <template>
-  <a-card size="small" :bordered="false" class="pushOrder-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="pushOrder-wrap">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline">
@@ -96,14 +96,9 @@
           </a-row>
         </a-form>
       </div>
-      <!-- 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.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
-          <span v-if="$hasPermissions('M_pushOrderManagementList_salesPrice')">下推总金额:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount) : '--' }}</strong>;</span>
-        </div>
-      </a-alert>
+    </a-card>
+    <!-- <a-card size="small" :bordered="false"> -->
+    <a-spin :spinning="spinning" tip="Loading...">
       <!-- 列表 -->
       <s-table
         class="sTable fixPagination"
@@ -116,19 +111,29 @@
         :scroll="{ y:tableHeight, x:1890 }"
         :defaultLoadData="false"
         bordered>
+        <!-- 超时环节提示 -->
+        <template slot="tip" slot-scope="text, record">
+          <a-tooltip placement="top">
+            <template slot="title">
+              <span>已超时2天</span>
+            </template>
+            <div>
+              <a-icon type="exclamation-circle" :style="{color:'#ed1c24',fontSize:'26px'}"/>
+              <span>{{ record.salesBillNo }}</span>
+            </div>
+          </a-tooltip>
+        </template>
         <!-- 销售单号 -->
         <template slot="salesBillNo" slot-scope="text, record">
-          <span class="link-bule" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
-          <span v-else>{{ record.salesBillNo }}</span>
+          <span class="link-bule" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
         </template>
         <!-- 备货单号 -->
         <template slot="dispatchBillNo" slot-scope="text, record">
-          <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
-          <span v-else>{{ record.dispatchBillNo }}</span>
+          <span class="link-bule" @click="handleDetail(record,1)">{{ 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 slot="sendBillNo" slot-scope="text, record">
+          <span class="link-bule" @click="handleDetail(record,2)">{{ record.dispatchBillNo }}</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -154,7 +159,7 @@
       </s-table>
 
       <!-- 操作提示 -->
-      <commonModal modalTit="操作提示" :openModal="showTipModal" @cancel="canselModal" @ok="updatePrintStatus">
+      <!-- <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>
           <div style="line-height: 24px;">
@@ -162,22 +167,27 @@
             <div>客户名称:{{ tipData&&tipData.buyerName }}</div>
           </div>
         </div>
-      </commonModal>
+      </commonModal> -->
 
       <!-- 查看销售单或备货单详情 -->
       <commonModal
-        modalTit="销售单详情"
+        :modalTit="detailType?'备货单详情':'销售单详情'"
         bodyPadding="10px"
         width="70%"
         :showFooter="false"
         :openModal="showDetailModal"
-        @cancel="closeDetailModal">
-        <salesDetail v-if="showDetailModal" ref="salesDetail" :bizSn="bizSn"></salesDetail>
+        @cancel="cancelDetail">
+        <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
+        <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
+        <financialDetailModal v-if="detailType==3" ref="financialDetail" :bizSn="bizSn"></financialDetailModal>
       </commonModal>
       <!-- 发货说明 -->
       <explainInfoModal v-drag :rowData="tipData" :openModal="showInfoModal" @close="canselModal"></explainInfoModal>
+      <!-- 发货单详情 -->
+      <detailModal v-drag ref="detailModal" :openModal="showTipModal" @cancel="showTipModal=false" @ok="sendSuccess"></detailModal>
     </a-spin>
-  </a-card>
+    <!-- </a-card> -->
+  </div>
 </template>
 
 <script>
@@ -193,22 +203,28 @@ import chooseWarehouse from '@/views/common/chooseWarehouse'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.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 detailModal from '@/views/salesManagement/sendOutOrder/detailModal.vue'
+import financialDetailModal from '@/views/financialManagement/financialCollection/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, chooseWarehouse },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, Area, salesDetail, dispatchDetail, detailModal, financialDetailModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       showDetailModal: false,
+      showTipModal: false,
       showInfoModal: false,
       exportLoading: false,
       bizSn: null,
       tableHeight: 0,
+      detailType: 0,
       time: [
         moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -239,7 +255,6 @@ export default {
         totalQty: 0,
         totalRecord: 0
       },
-      showTipModal: false,
       tipData: null,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -267,34 +282,45 @@ export default {
   },
   computed: {
     columns () {
+      const _this = this
       const arr = [
-        { title: '超时环节提醒', scopedSlots: { customRender: 'salesBillNo' }, width: '120px', align: 'center' },
-        { title: '提交时间', dataIndex: 'createDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省份', dataIndex: 'provinceName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '120px', align: 'center' },
+        { title: '超时环节提醒', scopedSlots: { customRender: 'tip' }, width: '120px', align: 'center', fixed: 'left' },
+        { title: '提交时间', dataIndex: 'createDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
+        { title: '省份', dataIndex: 'provinceName', align: 'center', width: '80px', customRender: function (text) { return text || '--' }, fixed: 'left' },
+        { title: '客户名称', dataIndex: 'buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true, fixed: 'left' },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '120px', align: 'center', fixed: 'left' },
         { 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: '发货单号', scopedSlots: { customRender: 'sendBillNo' }, width: '120px', align: 'center' },
+        { title: '所在区域', dataIndex: 'subareaName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所在分区', dataIndex: 'subareaAreaName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', 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: 'warehouseName', width: '150px', align: 'left', 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 || '--' } },
-        { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款方式', dataIndex: 'settlePrintStateDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
+
+        { title: '审核时间', dataIndex: 'stockUpDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下推数量', dataIndex: 'totalCategory', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '下推金额', dataIndex: 'totalAmount', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
+        { title: '备货允许打印时间', dataIndex: 'stockOutDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备货时间', dataIndex: 'stockOutDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货创建时间', dataIndex: 'stockOutDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'voidFlagDictValue', 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' }
+        { title: '发货状态', dataIndex: 'voidFlagDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款金额', dataIndex: 'totalAmount', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
+        { title: '收款时间', dataIndex: 'stockOutDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货编号', dataIndex: 'sendNo', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '托运日期', dataIndex: 'stockOutDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收货人', dataIndex: 'receiverName', width: '80px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '物流电话', dataIndex: 'stockOutDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '物流单号', dataIndex: 'stockOutDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+
+        { title: '总件数', dataIndex: 'totalQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '运费合计', dataIndex: 'totalAmount', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(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 || '--' } },
+        { title: '备注', dataIndex: 'checkStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ]
-      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
     }
   },
@@ -324,18 +350,25 @@ export default {
     },
     // 详情
     handleDetail (row, type) {
-      if (type == 0) {
-        this.$store.state.app.curActionPermission = 'B_salesDetail'
-        this.bizSn = row.salesBillSn
+      this.detailType = type
+      if (type != 2) {
         this.showDetailModal = true
+        if (type == 3) {
+          this.$refs.financialDetail.getDetail()
+        }
       } else {
-        this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
+        this.showTipModal = true
+        this.$refs.detailModal.getDetail(row, 1, '发货单详情')
       }
     },
     closeDetailModal () {
       this.showDetailModal = false
       this.$store.state.app.curActionPermission = ''
     },
+    sendSuccess () {
+      this.showTipModal = false
+      this.$refs.table.refresh()
+    },
     // 查看发货说明
     handleExplainInfo (row) {
       this.tipData = row
@@ -400,7 +433,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 240
+      this.tableHeight = window.innerHeight - tableSearchH - 320
     }
   },
   watch: {

+ 7 - 6
src/views/salesReturnManagement/returnConfirmation/detailModal.vue

@@ -101,12 +101,13 @@ export default {
         { title: '坏件数量', dataIndex: 'badQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '良品数量', dataIndex: 'goodQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '返库数量', dataIndex: 'backStockQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货原因', dataIndex: 'returnReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '退货原因', dataIndex: 'returnReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: 'returnReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('B_returnConfirmation_detail_salesPrice')) { //  售价权限
-        arr.splice(10, 0, { title: '实际退货单价', dataIndex: 'price', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(11, 0, { title: '实际退货金额', dataIndex: 'totalAmount', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(12, 0, { title: '实际退货单价说明', dataIndex: 'priceRemark', width: '12%', align: 'center', customRender: function (text) { return text || '--' } })
+        arr.splice(11, 0, { title: '实际退货单价', dataIndex: 'price', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(12, 0, { title: '实际退货金额', dataIndex: 'totalAmount', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(13, 0, { title: '实际退货单价说明', dataIndex: 'priceRemark', width: '12%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       return arr
     }
@@ -134,10 +135,10 @@ export default {
         this.detailData = null
         this.$refs.table.clearTable()
         this.$store.state.app.curActionPermission = ''
-      }else{
+      } else {
         this.$store.state.app.curActionPermission = 'B_returnConfirmation_detail'
         this.getDetail()
-        this.$nextTick(()=>{
+        this.$nextTick(() => {
           this.$refs.table.refresh(true)
         })
       }

+ 9 - 6
src/views/salesReturnManagement/salesReturn/detail.vue

@@ -51,6 +51,7 @@
               <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="创建时间">{{ detailData&&detailData.createDate || '--' }}</a-descriptions-item>
               <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditTime || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货类别">良品退货</a-descriptions-item>
               <a-descriptions-item label="退货类型">{{ detailData&&detailData.salesReturnTypeDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="附件" v-if="detailData" :span="3">
                 <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">
@@ -93,6 +94,7 @@
               :rowKey="record => record.id"
               :columns="columns"
               :data="loadData"
+              :scroll="{ x: 'calc(700px + 50%)'}"
               bordered></s-table>
           </a-tab-pane>
           <a-tab-pane :key="2" tab="审核进度" >
@@ -203,14 +205,15 @@ export default {
         { title: '坏件数量', dataIndex: 'badQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '良品数量', dataIndex: 'goodQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '返库数量', dataIndex: 'backStockQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货原因', dataIndex: 'returnReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '退货原因', dataIndex: 'returnReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: 'returnReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('B_salesReturnDetail_salesPrice') && this.showFlag != 0) { //  售价权限
-        arr.splice(10, 0, { title: '参考退货单价', dataIndex: 'initialPrice', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(11, 0, { title: '参考退货金额', dataIndex: 'initialAmount', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(12, 0, { title: '实际退货单价', dataIndex: 'price', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(13, 0, { title: '实际退货金额', dataIndex: 'totalAmount', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(14, 0, { title: '实际退货单价说明', dataIndex: 'priceRemark', width: '12%', align: 'center', customRender: function (text) { return text || '--' } })
+        arr.splice(11, 0, { title: '参考退货单价', dataIndex: 'initialPrice', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(12, 0, { title: '参考退货金额', dataIndex: 'initialAmount', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(13, 0, { title: '实际退货单价', dataIndex: 'price', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(14, 0, { title: '实际退货金额', dataIndex: 'totalAmount', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(15, 0, { title: '实际退货单价说明', dataIndex: 'priceRemark', width: '12%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       return arr
     }