lilei 2 năm trước cách đây
mục cha
commit
8d85d77d7b

+ 1 - 1
public/version.json

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

+ 4 - 1
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -125,7 +125,10 @@
                 </template>
                 <!-- 包装数 -->
                 <template slot="baozh" slot-scope="text, record">
-                  {{ record.packQty||'--' }}/{{ record.packQtyUnit||'--' }}
+                  <span v-if="record.packQty&&record.packQtyUnit">
+                    {{ record.packQty||'--' }}{{ record.unit }}/{{ record.packQtyUnit||'--' }}
+                  </span>
+                  <span v-else>--</span>
                 </template>
                 <!-- 产品编码 -->
                 <template slot="code" slot-scope="text, record">

+ 5 - 2
src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue

@@ -25,7 +25,7 @@
                   <a-input id="purchaseOrderEdit-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
                 </a-form-model-item>
               </a-col>
-             <!-- <a-col :flex="2">
+              <!-- <a-col :flex="2">
                 <a-form-model-item label="原厂编码">
                   <a-input id="purchaseOrderEdit-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
                 </a-form-model-item>
@@ -71,7 +71,10 @@
           </template>
           <!-- 包装数 -->
           <template slot="baozh" slot-scope="text, record">
-            {{ record.packQty||'--' }}/{{ record.packQtyUnit||'--' }}
+            <span v-if="record.packQty&&record.packQtyUnit">
+              {{ record.packQty||'--' }}{{ record.unit }}/{{ record.packQtyUnit||'--' }}
+            </span>
+            <span v-else>--</span>
           </template>
           <!-- 产品编码 -->
           <template slot="code" slot-scope="text, record">

+ 28 - 13
src/views/shoppingCarManagement/shoppingCar/list.vue

@@ -74,11 +74,22 @@
       bordered>
       <!-- 采购数量 -->
       <template slot="purchaseQty" slot-scope="text, record">
-        <a-input placeholder="请输入采购数量" v-model="record.qty" @change="updateQty(record)"/>
+        <a-input-number
+          size="small"
+          v-model="record.qty"
+          :precision="0"
+          :min="1"
+          :max="999999"
+          @blur="updateQty(record)"
+          style="width: 100%;"
+          placeholder="请输入采购数量" />
       </template>
       <!-- 包装数 -->
       <template slot="baozh" slot-scope="text, record">
-        {{ record.productEntity.packQty||'--' }}/{{ record.productEntity.packQtyUnit||'--' }}
+        <span v-if="record.productEntity.packQty&&record.productEntity.packQtyUnit">
+          {{ record.productEntity.packQty||'--' }}{{ record.productEntity.unit }}/{{ record.productEntity.packQtyUnit||'--' }}
+        </span>
+        <span v-else>--</span>
       </template>
       <!-- 产品编码 -->
       <template slot="productCode" slot-scope="text, record">
@@ -200,14 +211,18 @@ export default {
     },
     // 修改数量
     updateQty (row) {
-      purchaseUpdateQty({ qty: row.qty, purchaseCartSn: row.purchaseCartSn }).then(res => {
-        if (res.status == 200) {
-          this.$message.info(res.message)
-          row.qtyBack = row.qty
-        } else {
-          row.qty = row.qtyBack
-        }
-      })
+      if (row.qty != row.qtyBack && row.qty) {
+        purchaseUpdateQty({ qty: row.qty, purchaseCartSn: row.purchaseCartSn }).then(res => {
+          if (res.status == 200) {
+            this.$message.info(res.message)
+            row.qtyBack = row.qty
+          } else {
+            row.qty = row.qtyBack
+          }
+        })
+      } else {
+        row.qty = row.qtyBack
+      }
     },
     // 批量删除
     deleteMore () {
@@ -265,7 +280,7 @@ export default {
           let content = ''
           if ((res.data.productSizeRepeat != res.data.productSize) && (res.data.productSizeRepeat != 0)) {
             content = `您已经选择 ${res.data.productSize} 个产品,其中 ${res.data.productSizeRepeat} 个产品已经存在于采购单中,本次只会加入不重复的产品。确认加入本次采购吗?`
-            this.confirmFun(content,params)
+            this.confirmFun(content, params)
           } else if (res.data.productSizeRepeat == res.data.productSize) {
             content = `抱歉,您选择的 ${res.data.productSize} 个产品,采购单中已经全部存在,无需加入!`
             this.$info({
@@ -280,12 +295,12 @@ export default {
             })
           } else {
             content = `您已经选择 ${res.data.productSize} 个产品,确认要将已选产品加入本次采购吗?`
-            this.confirmFun(content,params)
+            this.confirmFun(content, params)
           }
         }
       })
     },
-    confirmFun (content,params) {
+    confirmFun (content, params) {
       const _this = this
       this.$confirm({
         title: '提示',