Bladeren bron

bug 修复

lilei 2 jaren geleden
bovenliggende
commit
1be5ec1cf0

+ 1 - 1
src/api/spareParts.js

@@ -14,7 +14,7 @@ export const sparePartsList = (params) => {
 
 export const sparePartsDetailExport = (params) => {
   return axios({
-    url: '/spareParts/detail/export',
+    url: '/report/spareParts/exportDetail',
     data: params,
     method: 'post',
     responseType: 'blob'

+ 40 - 26
src/views/salesManagement/outboundOrder/selectGlOrderModal.vue

@@ -16,13 +16,18 @@
           <a-form layout="inline">
             <a-row :gutter="15">
               <a-col :md="6" :sm="24">
-                <a-form-item label="销退单号">
-                  <a-input v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入销退单号"/>
+                <a-form-item label="业务单号">
+                  <a-input v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入业务单号"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="客户名称">
-                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="billOfLadingEdit-buyerSn" @change="custChange" />
+                  <a-input v-model.trim="queryParam.demanderName" allowClear placeholder="请输入客户名称"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="收货客户名称">
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" defValKey="buyerSn" @change="custChange" v-model="queryParam.receiverSn" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -45,13 +50,9 @@
           :scroll="{ y: 400 }"
           :pageSize="10"
           bordered>
-          <!-- 收款单号 -->
-          <template slot="salesReturnBillNo" slot-scope="text, record">
-            {{ record.salesReturnBillNo }}
-          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <div v-if="record.billStatus == 'WAIT_RECEIVE'">
+            <div v-if="!(record.outBizType == 'SALES'&&record.financialStatus=='WAIT')&&record.sendFlag==0">
               <a-button
                 size="small"
                 type="link"
@@ -71,7 +72,7 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { salesReturnList } from '@/api/salesReturn'
+import { stockOutList } from '@/api/stockOut'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 export default {
   name: 'SelectGlOrderModal',
@@ -99,31 +100,39 @@ export default {
       spinning: false,
       handlePlData: [],
       queryParam: {
-        salesReturnBillNo: '',
-        buyerSn: undefined
+        outBizNo: '',
+        demanderName: '',
+        receiverSn: undefined,
+        outBizTypeList: ['SALES', 'ALLOCATE']
       },
       columns: [
-        { title: '序号', dataIndex: 'no', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '15%', align: 'center' },
-        { title: '客户名称', dataIndex: 'buyerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '申请退货数量', dataIndex: 'totalQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库单号', dataIndex: 'stockOutNo', width: '10%', align: 'center' },
+        { title: '业务单号', dataIndex: 'outBizSubNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'demanderName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品款数', dataIndex: 'productTotalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单据审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款状态', dataIndex: 'financialStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货状态', dataIndex: 'sendFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
       ],
       orginData: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return salesReturnList(Object.assign(parameter, this.queryParam)).then(res => {
+        return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
-              const index = this.chooseData.findIndex(item => data.list[i].salesReturnBillNo == item.salesReturnBillNo)
+              const index = this.chooseData.findIndex(item => data.list[i].stockOutSn == item.stockOutSn)
               data.list[i].checked = index >= 0
             }
             this.disabled = false
@@ -147,13 +156,13 @@ export default {
   },
   methods: {
     custChange (val) {
-      this.queryParam.buyerSn = val.key
+      this.queryParam.receiverSn = val.key || ''
     },
     // 删除
     handleDel (row) {
-      const i = this.chooseData.findIndex(item => row.salesReturnBillNo == item.salesReturnBillNo)
+      const i = this.chooseData.findIndex(item => row.stockOutSn == item.stockOutSn)
       this.chooseData.splice(i, 1)
-      const oi = this.orginData.findIndex(item => row.salesReturnBillNo == item.salesReturnBillNo)
+      const oi = this.orginData.findIndex(item => row.stockOutSn == item.stockOutSn)
       if (oi >= 0) {
         this.orginData[oi].checked = false
       }
@@ -162,6 +171,7 @@ export default {
     handleChoose (row) {
       row.checked = true
       this.chooseData.push(row)
+      this.$emit('choose')
     },
     // 取消
     handleCommonCancel () {
@@ -170,11 +180,15 @@ export default {
     // 重置
     resetSearchForm () {
       this.queryParam = {
-        salesReturnBillNo: '',
-        buyerSn: undefined
+        outBizNo: '',
+        demanderName: '',
+        receiverSn: undefined,
+        outBizTypeList: ['SALES', 'ALLOCATE']
       }
       this.orginData = []
-      this.$refs.dealerSubareaScopeList.resetForm()
+      this.$nextTick(() => {
+        this.$refs.dealerSubareaScopeList.resetForm()
+      })
       if (this.$refs.table) {
         this.$refs.table.refresh(true)
       }

+ 17 - 4
src/views/salesManagement/outboundOrder/sendGoodModal.vue

@@ -18,11 +18,17 @@
         </div>
         <div style="margin-bottom:10px;" v-if="isEdit">
           <a-table :columns="glColumns" :pagination="false" :scroll="{ y: 200 }" :data-source="sendBillStockOutList" bordered>
-            <template slot="action" slot-scope="text, record, index">
+            <!-- 客户名称 -->
+            <template slot="buyerName" slot-scope="text, record">
+              {{ record.buyerName || record.demanderName }}
+            </template>
+            <!-- 操作 -->
+            <template slot="action" slot-scope="text, record">
               <a-button
                 size="small"
                 type="link"
                 class="button-error"
+                @click="delStockOutList(record)"
               >
                 删除
               </a-button>
@@ -196,6 +202,7 @@
       modalTit="选择关联单据"
       :chooseData="sendBillStockOutList"
       :openModal="showGlModal"
+      @choose="getProductTotal"
       @cancel="showGlModal=false"></selectGlOrderModal>
   </a-modal>
 </template>
@@ -269,11 +276,11 @@ export default {
         { title: '业务单号', dataIndex: 'outBizSubNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'buyerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', scopedSlots: { customRender: 'buyerName' }, width: '12%', align: 'center', ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'productTotalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单据审核时间', dataIndex: 'settleTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款时间', dataIndex: 'settleTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
       ],
@@ -310,6 +317,12 @@ export default {
         this.form.customerAddressDetail = customeInfo.addr
       }
     },
+    // 删除出库单
+    delStockOutList (row) {
+      const i = this.sendBillStockOutList.findIndex(item => row.stockOutSn == item.stockOutSn)
+      this.sendBillStockOutList.splice(i, 1)
+      this.getProductTotal()
+    },
     // 编辑
     getDetail (data) {
       this.spinning = true
@@ -356,7 +369,7 @@ export default {
         stockOutSnList.push(item.stockOutSn)
       })
       // 编辑时不需要传
-      this.form.stockOutSnList = this.isEdit ? [] : stockOutSnList
+      this.form.stockOutSnList = stockOutSnList
       this.productTotal = ret
     },
     // 计算运费合计

+ 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.183:8602/ocs-admin',
+        target: 'http://192.168.0.215/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: {