소스 검색

关联单据修改

lilei 2 년 전
부모
커밋
e05e610a67
2개의 변경된 파일43개의 추가작업 그리고 62개의 파일을 삭제
  1. 40 59
      src/views/financialManagement/financialCollection/dispatchModal.vue
  2. 3 3
      src/views/financialManagement/financialCollection/list.vue

+ 40 - 59
src/views/financialManagement/financialCollection/dispatchModal.vue

@@ -3,10 +3,10 @@
     centered
     :footer="null"
     :maskClosable="false"
-    title="关联备货单"
+    title="关联单"
     v-model="isShow"
     @cancel="handleCommonCancel"
-    width="50%">
+    width="70%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div v-if="detailData">
         <a-descriptions :column="{ xs: 2, sm: 3, md: 2}">
@@ -27,44 +27,20 @@
         :showPagination="false"
         :defaultLoadData="true"
         bordered>
-        <!-- 销售单号 -->
-        <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>
-        </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>
-        </template>
       </s-table>
       <div class="btn-box" style="text-align:center;padding-top:20px;">
         <a-button @click="handleCommonCancel">关闭</a-button>
       </div>
     </a-spin>
-    <!-- 查看销售单或备货单详情 -->
-    <commonModal
-      :modalTit="detailType?'备货单详情':'销售单详情'"
-      bodyPadding="10px"
-      width="70%"
-      :showFooter="false"
-      :openModal="showDetailModal"
-      @cancel="cancelDetail">
-      <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
-      <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
-    </commonModal>
   </a-modal>
 </template>
 
 <script>
 import { STable } from '@/components'
-import commonModal from '@/views/common/commonModal.vue'
-import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
-import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
-import { queryDispatchBillListBySn } from '@/api/financeBook.js'
+import { querySettleReceiptFinanceBookList } from '@/api/financeBook.js'
 export default {
   name: 'DispatchModal',
-  components: { STable, commonModal, salesDetail, dispatchDetail },
+  components: { STable },
   props: {
     openModal: {
       type: Boolean,
@@ -78,40 +54,55 @@ export default {
   data () {
     return {
       spinning: false,
-      showDetailModal: false,
-      detailType: 2,
-      bizSn: null,
       isShow: this.openModal,
       detailData: null,
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '13%', align: 'center' },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '13%', align: 'center' },
-        { title: '发货编号', dataIndex: 'sendNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品款数', dataIndex: 'totalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '单据号', dataIndex: 'bizNo', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '收货客户名称', dataIndex: 'receiverName', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '发货编号', dataIndex: 'sendNo', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '产品款数', dataIndex: 'totalCategory', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '产品数量', dataIndex: 'totalQty', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '总售价', dataIndex: 'totalAmount', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'financialStatusDictValue', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        this.spinning = true
-        delete parameter.tableId
-        delete parameter.index
-        return queryDispatchBillListBySn({ bookSn: this.itemSn }).then(res => {
+        const params = Object.assign(parameter, { bookSn: this.itemSn })
+        return querySettleReceiptFinanceBookList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
-            const no = 0
             for (var i = 0; i < data.length; i++) {
-              data[i].no = no + i + 1
+              data[i].no = i + 1
+              const cons = data[i].bizType == 'DISPATCH' ? {
+                buyerName: data[i].dispatchBill.buyerName,
+                receiverName: data[i].dispatchBill.receiverName,
+                sendNo: data[i].dispatchBill.sendNo,
+                totalCategory: data[i].dispatchBill.totalCategory,
+                totalQty: data[i].dispatchBill.totalQty,
+                totalAmount: data[i].dispatchBill.totalAmount,
+                billStatusDictValue: data[i].dispatchBill.billStatusDictValue,
+                financialStatusDictValue: data[i].dispatchBill.financialStatusDictValue,
+                dispatchBillSn: data[i].dispatchBill.dispatchBillSn,
+                salesBillSn: data[i].dispatchBill.salesBillSn
+              } : {
+                buyerName: data[i].allocateBill.buyerName,
+                receiverName: data[i].allocateBill.receiverName,
+                sendNo: data[i].allocateBill.sendNo,
+                totalCategory: data[i].allocateBill.totalCategory,
+                totalQty: data[i].allocateBill.totalQty,
+                totalAmount: data[i].allocateBill.totalPrice,
+                billStatusDictValue: data[i].allocateBill.stateDictValue,
+                allocateNo: data[i].allocateBill.allocateNo,
+                allocateSn: data[i].allocateBill.allocateSn
+              }
+              data[i] = Object.assign(data[i], cons)
             }
-            this.total = data.length
-            this.disabled = false
           }
-          this.spinning = false
           return data
         })
       }
@@ -125,16 +116,6 @@ export default {
     },
     setDetail (data) {
       this.detailData = data
-    },
-    handleDetail (row, type) {
-      this.detailType = type
-      this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
-      this.showDetailModal = true
-    },
-    cancelDetail () {
-      this.showDetailModal = false
-      this.detailType = 2
-      this.bizSn = null
     }
   },
   watch: {

+ 3 - 3
src/views/financialManagement/financialCollection/list.vue

@@ -16,8 +16,8 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="关联备货单号">
-                <a-input id="financialCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+              <a-form-item label="关联单据单号">
+                <a-input id="financialCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入关联单据单号"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -229,7 +229,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
-        { title: '关联备货单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
+        { title: '关联单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
         { title: '收款事由', dataIndex: 'bookReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '付款方', dataIndex: 'payerName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },