Browse Source

Merge branch 'develop_szhj07' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_szhj07

chenrui 2 năm trước cách đây
mục cha
commit
fb8678baea

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1668159132330
+  "version": 1668405739081
 }

+ 23 - 5
src/views/numsGoodsShelves/replenishmentManagement/detailModal.vue

@@ -24,8 +24,18 @@
               </div>
             </a-descriptions-item>
             <a-descriptions-item label="关联销售单" :span="3" v-if="detailData.billState=='WAIT_CHECK' || detailData.billState=='WAIT_OUT_STOCK' || detailData.billState=='FINISH'">
-              <a style="margin-right:10px;color:#00aaff;" v-for="item in salesOrderList" :key="item.id" @click="viewSales(item)">{{ item.salesBillNo }};</a>
-              <a-button type="primary" class="button-info" @click="showPlModal=true">生成销售单</a-button>
+              <div style="word-break: break-all;">
+                <a
+                  v-if="totalNums"
+                  style="margin-right:10px;color:#00aaff;"
+                  v-for="item in salesOrderList"
+                  :key="item.id"
+                  @click="viewSales(item)">
+                  {{ item.salesBillNo }};
+                </a>
+                <a-button v-if="totalNums" type="primary" class="button-info" @click="showPlModal=true">生成销售单</a-button>
+                <span v-else>--</span>
+              </div>
             </a-descriptions-item>
           </a-descriptions>
         </div>
@@ -97,6 +107,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import commonModal from '@/views/common/commonModal.vue'
 import salesDetailModal from '@/views/salesManagement/salesQuery/detail.vue'
+import { salesDetailBySn } from '@/api/sales'
 import { shelfReplenishDetailList, shelfReplenishDetail, queryRelationSalesBill, createSalesBill } from '@/api/shelfReplenish'
 export default {
   name: 'DetailModal',
@@ -162,8 +173,9 @@ export default {
     },
     totalNums () {
       let ret = 0
+      const isFin = this.detailData && this.detailData.billState == 'FINISH'
       this.listData.map(item => {
-        ret = ret + item.putQty
+        ret = ret + (isFin ? item.putQty : item.qty)
       })
       return ret
     }
@@ -203,8 +215,14 @@ export default {
     },
     // 查看销售单详情
     viewSales (item) {
-      this.orderSn = item.salesBillSn
-      this.openDetailModal = true
+      salesDetailBySn({ salesBillSn: item.salesBillSn }).then(res => {
+        if (res.data) {
+          this.orderSn = item.salesBillSn
+          this.openDetailModal = true
+        } else {
+          this.$message.info('此销售单已被删除!')
+        }
+      })
     },
     pageInit () {
       const vm = this

+ 5 - 8
src/views/numsGoodsShelves/replenishmentManagement/printStickerModal.vue

@@ -58,7 +58,7 @@
 import { commonMixin } from '@/utils/mixin'
 import printView from './printView.vue'
 import { STable, VSelect } from '@/components'
-import { shelfReplenishDetailList, shelfReplenishDetail, shelfReplenishPrintSign } from '@/api/shelfReplenish'
+import { shelfReplenishDetailList, shelfReplenishDetail } from '@/api/shelfReplenish'
 export default {
   name: 'PrintStickerModal',
   components: { STable, VSelect, printView },
@@ -90,8 +90,8 @@ export default {
             data = res.data
             for (var i = 0; i < data.length; i++) {
               data[i].no = i + 1
-              data[i].maxQty = data[i].billState == 'FINISH' ? data[i].putQty : data[i].confirmQty
-              data[i].printQty = data[i].billState == 'FINISH' ? data[i].putQty : data[i].confirmQty
+              data[i].maxQty = data[i].billState == 'FINISH' ? data[i].putQty : data[i].qty
+              data[i].printQty = data[i].billState == 'FINISH' ? data[i].putQty : data[i].qty
             }
             this.disabled = false
             this.listData = data || []
@@ -114,14 +114,11 @@ export default {
       const ret = [
         { title: '产品编码', dataIndex: 'product.code', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '补货应发数量', dataIndex: 'qty', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '实发数量', dataIndex: 'confirmQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '补货数量', dataIndex: 'qty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '签收数量', dataIndex: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '打印数量', scopedSlots: { customRender: 'printQty' }, width: '15%', align: 'center' },
         { title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
-      if (this.basicInfoData && this.basicInfoData.billState == 'FINISH') {
-        ret.splice(4, 0, { title: '签收数量', dataIndex: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-      }
       return ret
     }
   },