Browse Source

bug修复

chenrui 4 years ago
parent
commit
65a572a062

+ 2 - 2
src/api/purchaseReturn.js

@@ -22,7 +22,7 @@ export const purchaseReturnSave = (params) => {
 //  采购退货 删除
 export const purchaseReturnDel = (params) => {
   return axios({
-    url: `/purchaseReturn/delete//${params.id}`,
+    url: `/purchaseReturn/delete/${params.id}`,
     method: 'get'
   })
 }
@@ -67,7 +67,7 @@ export const purchaseReturnDetailSave = (params) => {
 //  采购退货 详情 删除
 export const purchaseReturnDetailDel = (params) => {
   return axios({
-    url: `/purchaseReturn/detail/delete//${params.id}`,
+    url: `/purchaseReturn/detail/delete/${params.id}`,
     method: 'get'
   })
 }

+ 1 - 1
src/config/router.config.js

@@ -681,7 +681,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'add',
+                path: 'add/:id/:sn',
                 name: 'storeTransferOutAdd',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/storeTransferOut/edit.vue'),
                 meta: {

+ 2 - 2
src/views/allocationManagement/storeTransferOut/list.vue

@@ -194,8 +194,8 @@ export default {
       this.$refs.table.refresh(true)
     },
     //  基本信息  保存
-    handleOk () {
-      this.$router.push({ path: `/allocationManagement/storeTransferOut/add` })
+    handleOk (data) {
+      this.$router.push({ path: `/allocationManagement/storeTransferOut/add/${data.id}/${data.storeCallOutSn}` })
     },
     //  删除
     handleDel (row) {

+ 1 - 0
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -363,6 +363,7 @@ export default {
     },
     //  添加/编辑
     handleAdd (row, isEdit) {
+      console.log(row, '--------------------添加编辑')
       if (!row.putCost) {
         this.$message.warning('请输入成本价')
         return

+ 4 - 4
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -22,7 +22,7 @@
         <a-collapse-panel key="1" header="选择产品">
           <!-- 筛选条件 -->
           <div class="table-page-search-wrapper">
-            <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-form layout="inline" @keyup.enter.native="getPurchaseBillDetailList(1)">
               <a-row :gutter="15">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="采购单号" prop="purchaseBillNo">
@@ -208,7 +208,7 @@ export default {
       this.queryParam.purchaseBillNo = ''
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
-      this.getPurchaseBillDetailList()
+      this.getPurchaseBillDetailList(1)
     },
     //  添加/编辑
     handleAdd (row, isEdit) {
@@ -290,7 +290,6 @@ export default {
     getPurchaseBillDetailList (pageNo) {
       this.pageNo = this.pageNo || pageNo
       this.disabled = true
-      this.queryParam = {}
       const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
       purchaseReturnPurchaseBillDetailList(params).then(res => {
         if (res.status == 200) {
@@ -337,6 +336,7 @@ export default {
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
+            data.list[i].qtyLeft = data.list[i].purchaseBillQtyLeft + data.list[i].qty
           }
           this.chooseLoadData = data.list
         } else {
@@ -362,7 +362,7 @@ export default {
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      vm.getPurchaseBillDetailList()
+      vm.getPurchaseBillDetailList(1)
       vm.getChooseProductList(1)
     })
   }

+ 3 - 3
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -27,7 +27,7 @@
                 v-model="queryParam.state"
                 ref="state"
                 id="purchaseReturnList-state"
-                code="STORE_CALL_OUT_STATE"
+                code="PURCHASE_RETURN_STATUS"
                 placeholder="请选择业务状态"
                 allowClear
               ></v-select>
@@ -99,8 +99,8 @@ export default {
         { title: '退货数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退款金额', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center' },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 100, align: 'center' },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象