lilei 2 年之前
父節點
當前提交
8476751675
共有 4 個文件被更改,包括 42 次插入18 次删除
  1. 1 1
      public/version.json
  2. 9 0
      src/api/receiving.js
  3. 30 15
      src/views/purchasingManagement/signWarehousing/edit.vue
  4. 2 2
      vue.config.js

+ 1 - 1
public/version.json

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

+ 9 - 0
src/api/receiving.js

@@ -96,3 +96,12 @@ export const receivingAuditList = (params) => {
     method: 'post'
   })
 }
+// 修改入库数量
+export const updateRealPutQty = (params) => {
+  const url = `/receivingDetail/updateRealPutQty`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 30 - 15
src/views/purchasingManagement/signWarehousing/edit.vue

@@ -18,9 +18,9 @@
           <div slot="message" >
             <div>
               产品款数 <strong>{{ item.totalPutCategory }}</strong> ,
-              本次发货数量合计 <strong>{{ item.totalPutQty }}</strong> ,
+              本次发货数量合计 <strong>{{ item.totalRealPutQty }}</strong> ,
               <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-                本次发货金额合计¥<strong>{{ item.totalPutAmount?toThousands(item.totalPutAmount,2):'0.00' }}</strong>
+                本次发货金额合计¥<strong>{{ item.totalRealPutAmount?toThousands(item.totalRealPutAmount,2):'0.00' }}</strong>
               </div>
             </div>
           </div>
@@ -45,11 +45,12 @@
           <template slot="warehouseNum" slot-scope="text, record">
             <a-input-number
               size="small"
-              v-model="record.putQty"
+              v-model="record.realPutQty"
               :precision="0"
               :min="0"
               :max="999999"
               style="width: 100%;"
+              @blur="changePutQty(record, bindex)"
               placeholder="请输入入库数量" />
           </template>
           <!-- 仓库仓位 -->
@@ -87,6 +88,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { purchaseWriteStockIn, receivingQuery, receivingDetail } from '@/api/purchase'
+import { updateRealPutQty } from '@/api/receiving'
 import { purchaseUpdateWarehouse } from '@/api/purchaseDetail'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
@@ -121,7 +123,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].shippedQty = data.list[i].putQty
+            data.list[i].shippedQty = data.list[i].realPutQty
             const warehouseSn = data.list[i].warehouseSn || undefined
             const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
             if (warehouseSn || warehouseLocationSn) {
@@ -151,22 +153,19 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购数量', dataIndex: 'qty', width: '6%', align: 'center', scopedSlots: { customRender: 'origqty' } },
-        { title: '本次发货数量', dataIndex: 'shippedQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '本次入库数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '本次入库数量', scopedSlots: { customRender: 'warehouseNum' }, width: '9%', align: 'center' },
-        { title: '本次入库金额', dataIndex: 'warehouseMoney', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
-        { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: '13%', align: 'center' }
+        { title: '本次发货数量', dataIndex: 'shippedQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次入库数量', scopedSlots: { customRender: 'warehouseNum' }, width: '8%', align: 'center' },
+        { title: '本次入库金额', dataIndex: 'realPutAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: '14%', align: 'center' }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
-        arr.splice(8, 0, { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(8, 0, { title: '本次发货金额', dataIndex: 'discountedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr
     }
@@ -269,6 +268,22 @@ export default {
         }
       })
     },
+    // 修改入库数量
+    changePutQty(record, bindex){
+      if(record.realPutQty == record.shippedQty){
+        return
+      }
+      this.spinning = true
+      updateRealPutQty({id:record.id,realPutQty:record.realPutQty}).then(res => {
+        if(res.status == 200){
+          this.$message.success(res.message)
+          this.$refs['table-' + bindex][0].refresh()
+        }else{
+          record.realPutQty = record.shippedQty
+        }
+        this.spinning = false
+      })
+    },
     // 修改仓库仓位
     changeWarehouseCascade (val, opt, ind, bindex) {
       let loadData = this.chooseLoadData[bindex][ind]

+ 2 - 2
vue.config.js

@@ -209,8 +209,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.111/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.2.117/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,