Browse Source

bug修复

chenrui 3 years ago
parent
commit
d3576c4021

+ 7 - 5
src/views/numsGoodsShelves/shelfMonitoring/list.vue

@@ -180,13 +180,15 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '货位号', dataIndex: 'shelfPlaceCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '绑定产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '绑定产品名称', dataIndex: 'productName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '货位产品状态', scopedSlots: { customRender: 'state' }, width: '15%', align: 'center' },
+        { title: '货位号', dataIndex: 'shelfPlaceCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '绑定产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '绑定产品名称', dataIndex: 'productName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '货位产品状态', scopedSlots: { customRender: 'state' }, width: '10%', align: 'center' },
+        { title: '补货在途', dataIndex: 'replenishBillQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调回在途', dataIndex: 'recallBillQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '当前库存', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '最大库容', dataIndex: 'maxQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '滞销天数', dataIndex: 'unsalableDays', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '滞销天数', dataIndex: 'unsalableDays', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'left' }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 6 - 2
src/views/numsGoodsShelves/shelfMonitoring/warehouseDetail.vue

@@ -58,6 +58,10 @@
           :data="loadData"
           :defaultLoadData="false"
           bordered>
+          <template slot="qty" slot-scope="text, record">
+            {{ (record.bizType == 'PUT_REPLENISH_BILL' || record.bizType == 'MONTH') ? '+' : (record.bizType == 'OUT_RECALL_BILL' || record.bizType == 'OUT_ORDER_BILL') ? '-':'' }}
+            {{ (record.qty || record.qty==0) ? record.qty : '--' }}
+          </template>
         </s-table>
       </a-card>
     </a-spin>
@@ -89,8 +93,8 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '24%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '关联单据类型', dataIndex: 'bizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '关联单据号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '关联单据号', dataIndex: 'bizNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', scopedSlots: { customRender: 'qty' }, width: '8%', align: 'center' }
         // { title: '状态', dataIndex: 'stateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 5 - 2
src/views/numsGoodsShelves/shelfSet/bindProductModal.vue

@@ -163,6 +163,9 @@ export default {
           if (this.type != 'bind') { // 修改信息、更换产品
             form.shelfProductSn = _this.nowData && _this.nowData.shelfProductApiEntity && _this.nowData.shelfProductApiEntity.shelfProductSn
           }
+          if (this.type == 'replace') { // 更换产品
+            form.updateProductFlag = 1
+          }
           _this.spinning = true
           shelfProductSave(form).then(res => {
             if (res.status == 200) {
@@ -185,7 +188,7 @@ export default {
       shelfProductDetail({ shelfPlaceSn: this.nowData && this.nowData.shelfPlaceSn }).then(res => {
         if (res.status == 200 && res.data) {
           this.productInfo = res.data
-          if(this.type == 'edit'){
+          if (this.type == 'edit') {
             this.form.productSn = res.data.productSn
             this.form.productCode = res.data.productCode
           }
@@ -198,7 +201,7 @@ export default {
         }
       })
     },
-    resetData(){
+    resetData () {
       this.form.productSn = undefined
       this.form.productCode = undefined
       this.form.price = ''