lilei 4 年之前
父节点
当前提交
4737498767

+ 1 - 1
src/views/salesManagement/waitDispatch/edit.vue

@@ -13,7 +13,7 @@
         <a-button key="1" type="primary" id="waitDispatch-print-btn">快速打印</a-button>
         <a-button key="1" type="primary" id="waitDispatch-print-btn">快速打印</a-button>
       </template>
       </template>
     </a-page-header>
     </a-page-header>
-    <a-card size="small" :bordered="false" class="waitDispatch-cont" v-if="salesBillSn">
+    <a-card :bordered="false" class="waitDispatch-cont" v-if="salesBillSn">
       <!-- 查询配件列表 -->
       <!-- 查询配件列表 -->
       <queryPart
       <queryPart
         ref="partQuery"
         ref="partQuery"

+ 20 - 4
src/views/salesManagement/waitDispatch/queryPart.vue

@@ -27,7 +27,7 @@
           </a-col>
           </a-col>
           <a-col :md="4" :sm="24">
           <a-col :md="4" :sm="24">
             <a-form-item label="类型">
             <a-form-item label="类型">
-              <a-select default-value="0" @change="handlePtypeChange">
+              <a-select v-model.trim="queryParam.ptype" >
                 <a-select-option value="0">
                 <a-select-option value="0">
                   全部产品
                   全部产品
                 </a-select-option>
                 </a-select-option>
@@ -130,6 +130,7 @@ export default {
       showSetting: false, // 设置弹框
       showSetting: false, // 设置弹框
       productType: [],
       productType: [],
       queryParam: {
       queryParam: {
+        ptype: '0', // 类型
         productCode: '', //  产品编码
         productCode: '', //  产品编码
         productName: '', //  产品名称
         productName: '', //  产品名称
         promotionFlag: undefined, //  是否促销品
         promotionFlag: undefined, //  是否促销品
@@ -150,7 +151,7 @@ export default {
         { title: '成本价', dataIndex: 'showCost', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '成本价', dataIndex: 'showCost', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '销售价', dataIndex: 'price', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '销售价', dataIndex: 'price', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '可用库存', dataIndex: 'kc', width: 150, align: 'center' },
+        { title: '可用库存', dataIndex: 'stockQty', width: 150, align: 'center' },
         { title: '销售数量', dataIndex: 'qty', width: 150, align: 'center' },
         { title: '销售数量', dataIndex: 'qty', width: 150, align: 'center' },
         { title: '已取消', dataIndex: 'cancelQty', width: 150, align: 'center' },
         { title: '已取消', dataIndex: 'cancelQty', width: 150, align: 'center' },
         { title: '已下推', dataIndex: 'pushedQty', width: 150, align: 'center' },
         { title: '已下推', dataIndex: 'pushedQty', width: 150, align: 'center' },
@@ -164,11 +165,26 @@ export default {
         this.queryParam.salesBillSn = this.salesBillSn
         this.queryParam.salesBillSn = this.salesBillSn
         return salesDetailAllList(Object.assign(parameter, this.queryParam)).then(res => {
         return salesDetailAllList(Object.assign(parameter, this.queryParam)).then(res => {
           let data = res.data
           let data = res.data
-          data = data.filter(item => item != null)
+          // 根据类型过滤数据
+          data = data.filter(item => {
+            if (this.queryParam.ptype == '1') {
+              return item != null && item.surplusQty > 0
+            }
+            if (this.queryParam.ptype == '2') {
+              return item != null && item.surplusQty > 0 && item.surplusQty <= item.stockQty
+            }
+            if (this.queryParam.ptype == '3') {
+              return item != null && item.surplusQty > item.stockQty
+            }
+            if (this.queryParam.ptype == '0') {
+              return item != null
+            }
+          })
+          // 增加编号
           const no = 0
           const no = 0
           for (var i = 0; i < data.length; i++) {
           for (var i = 0; i < data.length; i++) {
             data[i].no = no + i + 1
             data[i].no = no + i + 1
-            data[i].cancelNums = 1
+            data[i].cancelNums = data[i].surplusQty
           }
           }
           this.disabled = false
           this.disabled = false
           return data
           return data

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
     proxy: {
       '/api': {
       '/api': {
-        target: 'http://192.168.16.103:8602/ocs',
+        target: 'http://192.168.16.104:8602/ocs',
         // target: 'http://qpls-md.360arrow.com.cn/qpls-md',
         // target: 'http://qpls-md.360arrow.com.cn/qpls-md',
         // target: 'https://it.test.qiubcar.com/zyit',
         // target: 'https://it.test.qiubcar.com/zyit',
         ws: false,
         ws: false,