|
@@ -41,6 +41,12 @@
|
|
|
<el-form-item label="可配置数量:">
|
|
|
{{ seatNum }}
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="已配置数据:">
|
|
|
+ {{ configStockNum }}
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="未配置数量:">
|
|
|
+ {{ seatNum - configStockNum }}
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
|
<el-form-item label="库存模式:" class="is-required">
|
|
|
<div class="inventory_box">
|
|
@@ -79,7 +85,13 @@
|
|
|
<el-table-column label="可配置数量" align="center" prop="stock"></el-table-column>
|
|
|
<el-table-column label="配置数量" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="form.chennelListForm[chennelAtion].seatTypeList[scope.$index].stockNum" type="number" clearable placeholder="请输入数量"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="form.chennelListForm[chennelAtion].seatTypeList[scope.$index].stockNum"
|
|
|
+ type="number"
|
|
|
+ clearable
|
|
|
+ placeholder="请输入数量"
|
|
|
+ @input="(value)=>countNum(value,scope.$index)"
|
|
|
+ ></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -191,6 +203,7 @@ export default {
|
|
|
dataList: [], // 座位
|
|
|
|
|
|
seatNum: '',
|
|
|
+ configStockNum: 0, // 已分配的座位
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -253,6 +266,7 @@ export default {
|
|
|
await this.countBySeatTypFun(obj.auditoriumId,true)
|
|
|
obj.chennelListForm = this.setDataTree(obj)
|
|
|
this.form = obj
|
|
|
+ this.configStockNum = obj.configStockNum
|
|
|
this.setDictLabel(obj.chennelListForm[0],0)
|
|
|
console.log("list2====",this.form)
|
|
|
}
|
|
@@ -501,15 +515,21 @@ export default {
|
|
|
console.error("dfsdfdsfsd====",error)
|
|
|
}
|
|
|
},
|
|
|
+ // 选择渠道
|
|
|
setDictLabel(obj,index){
|
|
|
this.chennelAtion = index
|
|
|
if(obj.stockType == 1) {
|
|
|
- console.log('fsdfsdfsdfsdfsdfsdfsdfsfdsf')
|
|
|
this.getSeatSelectById()
|
|
|
}
|
|
|
},
|
|
|
+ // 计算可分配数量
|
|
|
+ countStockNum() {
|
|
|
+ this.form.chennelListForm.forEach((item,index)=>{
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 选择模式
|
|
|
setStockType(value) {
|
|
|
- console.log('fsdfsdfsdfsdfsdfsdfsdfsfdsf======',value)
|
|
|
if(value == 1) {
|
|
|
this.getSeatSelectById()
|
|
|
}
|
|
@@ -573,6 +593,13 @@ export default {
|
|
|
this.form.chennelListForm[this.chennelAtion].chennelSeatList = JSON.stringify(obj) == '{}'?null:obj
|
|
|
this.form.chennelListForm[this.chennelAtion].stockNum = list.length>0 ? list.length : ''
|
|
|
console.log("已选择的====",list,this.form.chennelListForm[this.chennelAtion].chennelSeatList)
|
|
|
+ },
|
|
|
+ /** 计算可分配座位 */
|
|
|
+ countNum(value,index) {
|
|
|
+ console.log("value,index=====",value,index)
|
|
|
+ if(value>this.form.chennelListForm[this.chennelAtion].seatTypeList[index],'stock',this.form.chennelListForm[this.chennelAtion].seatTypeList[index].stock) {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
};
|