Browse Source

达沃特复制和可用库存计算

caojunjie 2 years ago
parent
commit
062f4a8ec6

+ 0 - 2
src/views/businessManagement/inventoryAccount/configuration/mainList.json

@@ -116,7 +116,6 @@
       "search": false,
       "index": 12,
       "width": 100,
-      "cell": false,
       "overHidden": true
     },
     {
@@ -125,7 +124,6 @@
       "search": false,
       "index": 13,
       "width": 100,
-      "cell": true,
       "overHidden": true
     },
     {

+ 8 - 3
src/views/businessManagement/inventoryAccount/index.vue

@@ -19,7 +19,10 @@
 <!--          <span v-else>{{ scope.row.lockingQuantity }}</span>-->
         </template>
         <template slot-scope="scope" slot="surplusRouteQuantity">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="availableClick(scope.row,scope.index)">{{ scope.row.surplusRouteQuantity }}</span>
+          <span style="color: #409EFF;cursor: pointer" @click.stop="availableClick(scope.row,scope.index)">
+              <!--{{ scope.row.surplusRouteQuantity }}-->
+              {{Number(scope.row.balanceQuantity) - Number(scope.row.lockingQuantity)}}
+          </span>
         </template>
         <template slot="stockNameSearch">
           <warehouse-select v-model="search.storageId" :configuration="configurationWarehouse" />
@@ -212,10 +215,12 @@ export default {
     },
     rowCell(row, index) {
       if (JSON.parse(localStorage.getItem("saber-userInfo")).content.account === "admin"){
-        this.findObject(this.option.column, "lockingQuantity").cell = true
+        // this.findObject(this.option.column, "lockingQuantity").cell = true
+          row.surplusRouteQuantity = Number(row.balanceQuantity) - Number(row.lockingQuantity)
         this.$refs.crud.rowCell(row, index)
       }else {
-        this.findObject(this.option.column, "lockingQuantity").cell = false
+        // this.findObject(this.option.column, "lockingQuantity").cell = false
+          row.surplusRouteQuantity = Number(row.balanceQuantity) - Number(row.lockingQuantity)
         this.$refs.crud.rowCell(row, index)
       }
     },

+ 7 - 0
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -1487,6 +1487,7 @@ export default {
     }
     this.getDefault()
     if (this.detailData.id) {
+       // 详情进入
       this.queryData(this.detailData.id)
     }
     if (this.detailData.check) {
@@ -1501,6 +1502,7 @@ export default {
 
     }
     if (this.detailData.copyId) {
+        // 复制进入
       this.queryData(this.detailData.copyId, true)
     }
     this.oldForm = Object.assign({}, this.form);
@@ -1570,6 +1572,7 @@ export default {
       this.quantityChange(row)
     },
     queryData(id, isCopy = false, other) {
+        console.log(id,isCopy,other,'1573')
       this.pageLoading = true
       this.saveLoading = true
       detail(id).then(async res => {
@@ -1668,6 +1671,10 @@ export default {
           this.$set(this.form, 'orderStatus', '录入')
           this.form.status = 0
           this.browse = false
+
+            // 复制的数据要清除 生产时间
+            this.form.actualDeliveryDate = null
+
           delete this.form.id
           delete this.form.orgOrderNo
           delete this.form.orderNo

+ 19 - 0
src/views/product/detailsPage.vue

@@ -36,6 +36,9 @@
           <template slot="whether">
             <el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherChange"/>
           </template>
+            <template slot="whetherIntegral">
+                <el-switch v-model="form.whetherIntegral" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherIntegralChange"/>
+            </template>
         </avue-form>
       </trade-card>
       <trade-card title="库存管理" v-loading="loadingBtn">
@@ -266,6 +269,17 @@ export default {
               trigger: "blur"
             }]
           },
+            {
+                label: "是否为积分商品",
+                prop: "whetherIntegral",
+                labelWidth:120,
+                span: 8,
+                rules: [{
+                    required: true,
+                    message: "请输入通知标题",
+                    trigger: "blur"
+                }]
+            },
           {
             label: "备注",
             prop: "remarks",
@@ -489,6 +503,11 @@ export default {
           this.loadingBtn = false;
         });
     },
+      // 是否为积分商品的change事件
+      whetherIntegralChange(val){
+
+      },
+      // 是否管理批次号的change事件
     whetherChange(val){
       console.log(val)
       if (val == 0||val==null) {