MONSTER-ygh 9 hónapja
szülő
commit
994b251396

+ 4 - 3
src/views/venue/schedulingMr/dialog/addStock.vue

@@ -84,6 +84,7 @@
         this.stock = JSON.parse(JSON.stringify(data))
         this.tableData = JSON.parse(JSON.stringify(data.chennelStock))
         this.allData = JSON.parse(JSON.stringify(allData))
+        this.title = "渠道默认库存设置" + `(可售库存:${this.stock.stock})`
       },
       /**  票务信息  */
       async saveCommonConfigFun(value){
@@ -111,11 +112,11 @@
       async submitForm() {
         let count = 0
         this.tableData.forEach((item,index)=>{
-          count = count + (item.stock?item.stock:0)
+          count = count + (item.stock?item.stock:0) + (item.soldNum?item.soldNum:0)
         })
         console.log("count====",count)
-        if(this.stock.stock < count) {
-          this.$message.error("库存总合不能大于可售库存!");
+        if( this.stock.stock < count ) {
+          this.$message.error("渠道在售库存和已售数量总合不能大于总库存!");
           return
         }
         let params = JSON.parse(JSON.stringify(this.allData))

+ 1 - 1
src/views/venue/schedulingMr/index.vue

@@ -104,7 +104,7 @@
           size="mini"
           @click="handleStockAll"
           v-hasPermi="['schedulingMr:schedulingMr:stock']"
-        >渠道库存设置</el-button>
+        >默认渠道库存设置</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>