|
|
@@ -55,7 +55,7 @@
|
|
|
</span>
|
|
|
<span class=" col-11 offset-1 input-group" style=" border-radius: 5px; opacity: 1.5; text-align: center;">
|
|
|
<ul onselectstart="return false;" class="list-group tooltipTarget" style="width: 100%; max-height: 130px; overflow-y: scroll;">
|
|
|
- <li v-for="commodity in processContents[0].commodities" :id="commodity.id" :style="[{'background-color':processContents[0].commodity_id==commodity.id ? '#9fcdff':'' },{'text-decoration':commodityIds.includes(commodity.id+'_false')? 'line-through red' : ''}]"
|
|
|
+ <li v-for="commodity in processContents[0].commodities" :id="commodity.id" :style="[{'background-color':processContents[0].commodity_id==commodity.id ? '#9fcdff':'' },{'text-decoration':commodityIds.includes(process.wms_code+'_'+commodity.id+'_false')? 'line-through red' : ''}]"
|
|
|
@dblclick="selectedCommodity(commodity,processContents[0].wms_code,false)" class="list-group-item list-group-item-action p-0 m-0">
|
|
|
<div class="form-inline" style="cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
|
|
<small :title="commodity.name" class="text-left text-primary col-6 tooltipTarget" style="overflow: hidden;">@{{ commodity.name }}</small>
|
|
|
@@ -138,7 +138,7 @@
|
|
|
</span>
|
|
|
<span class=" col-11 offset-1 input-group" style=" border-radius: 5px; opacity: 1.5; text-align: center;">
|
|
|
<ul onselectstart="return false;" class="list-group tooltipTarget" style="width: 100%; max-height: 130px; overflow-y: scroll;">
|
|
|
- <li v-for="commodity in processContents[0].commodities" :id="commodity.id" :style="[{'background-color':processContents[0].commodity_id==commodity.id ? '#9fcdff':'' },{'text-decoration':commodityIds.includes(commodity.id+'_true')? 'line-through red' : ''}]"
|
|
|
+ <li v-for="commodity in processContents[0].commodities" :id="commodity.id" :style="[{'background-color':processContents[0].commodity_id==commodity.id ? '#9fcdff':'' },{'text-decoration':commodityIds.includes(process.wms_code_full+'_'+commodity.id+'_true')? 'line-through red' : ''}]"
|
|
|
@dblclick="selectedCommodity(commodity,processContents[0].wms_code,true)" class="list-group-item list-group-item-action p-0 m-0">
|
|
|
<div class="form-inline" style="cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
|
|
<small :title="commodity.name" class="text-left text-info col-6" style="overflow: hidden;">@{{ commodity.name }}</small>
|
|
|
@@ -385,7 +385,7 @@
|
|
|
return true;
|
|
|
});
|
|
|
if (is_return)return true;
|
|
|
- _this.commodityIds.push(processContent.commodity_id+"_"+type);
|
|
|
+ _this.commodityIds.push(wms_code+"_"+processContent.commodity_id+"_"+type);
|
|
|
processContent.addBtnShow=false;
|
|
|
processContentTemp=Object.assign({},processContent);
|
|
|
}
|
|
|
@@ -393,7 +393,7 @@
|
|
|
});
|
|
|
if (is_return)return;
|
|
|
if (bill_type==='入库单' && !type && sign){
|
|
|
- _this.commodityIds.push(processContentTemp.commodity_id+"_"+!type);
|
|
|
+ _this.commodityIds.push(wms_code+"_"+processContentTemp.commodity_id+"_"+!type);
|
|
|
processContentTemp['type']=true;
|
|
|
_this.processContents.unshift(processContentTemp);
|
|
|
}
|
|
|
@@ -405,12 +405,12 @@
|
|
|
_this.processContents.some(function (processContent,i) {
|
|
|
if (processContent.wms_code===wms_code && processContent.commodity_id===commodity_id && processContent.type===type) {
|
|
|
deleteData.unshift(i);
|
|
|
- _this.commodityIds.splice(_this.commodityIds.indexOf(processContent.commodity_id+"_"+type),1);
|
|
|
+ _this.commodityIds.splice(_this.commodityIds.indexOf(wms_code+"_"+processContent.commodity_id+"_"+type),1);
|
|
|
if (type) return true;
|
|
|
}
|
|
|
if (!type && processContent.wms_code===wms_code && processContent.commodity_id===commodity_id && processContent.type===!type){
|
|
|
deleteData.unshift(i);
|
|
|
- _this.commodityIds.splice(_this.commodityIds.indexOf(processContent.commodity_id+"_"+!type),1);
|
|
|
+ _this.commodityIds.splice(_this.commodityIds.indexOf(wms_code+"_"+processContent.commodity_id+"_"+!type),1);
|
|
|
}
|
|
|
});
|
|
|
if (!type) _this.sum -= amount;
|
|
|
@@ -441,7 +441,7 @@
|
|
|
selectedCommodity(commodity,wms_code,type){
|
|
|
let _this=this;
|
|
|
_this.processContents.every(function (processContent) {
|
|
|
- if (_this.commodityIds.includes(commodity.id+"_"+type)){
|
|
|
+ if (_this.commodityIds.includes(wms_code+"_"+commodity.id+"_"+type)){
|
|
|
tempTip.setDuration(3000);
|
|
|
tempTip.show('该单据已被添加至下边!');
|
|
|
return;
|
|
|
@@ -570,7 +570,7 @@
|
|
|
content['addBtnShow'] = false ;
|
|
|
content['type'] = type ;
|
|
|
this.processContents.unshift(content);
|
|
|
- this.commodityIds.push(commodity.id+"_"+content['type']);
|
|
|
+ this.commodityIds.push(processContent.bill_type+"_"+commodity.id+"_"+content['type']);
|
|
|
if (!type) this.sum += Number(commodity.amount);
|
|
|
return content;
|
|
|
},
|
|
|
@@ -578,14 +578,14 @@
|
|
|
addAll(processContent){
|
|
|
let _this=this;
|
|
|
processContent.commodities.forEach(function (commodity) {
|
|
|
- if (!_this.commodityIds.includes(commodity.id+"_"+false)){
|
|
|
+ if (!_this.commodityIds.includes(processContent.bill_type+"_"+commodity.id+"_"+false)){
|
|
|
let content = _this._add(processContent,commodity,false);
|
|
|
if (processContent.bill_type==='入库单' && !_this.commodityIds.includes(commodity.id+"_"+true)){
|
|
|
let contentTemp={};
|
|
|
Object.assign(contentTemp,content);
|
|
|
contentTemp['type'] = true;
|
|
|
_this.processContents.unshift(contentTemp);
|
|
|
- _this.commodityIds.push(commodity.id+"_"+contentTemp['type']);
|
|
|
+ _this.commodityIds.push(processContent.bill_type+"_"+commodity.id+"_"+contentTemp['type']);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -596,9 +596,9 @@
|
|
|
finishedProductAddAll(processContent){
|
|
|
let _this=this;
|
|
|
processContent.commodities.forEach(function (commodity) {
|
|
|
- if (!_this.commodityIds.includes(commodity.id + "_" + true)) {
|
|
|
+ if (!_this.commodityIds.includes(processContent.bill_type+"_"+commodity.id + "_" + true)) {
|
|
|
_this._add(processContent, commodity, true);
|
|
|
- _this.commodityIds.push(commodity.id+"_"+'true');
|
|
|
+ _this.commodityIds.push(processContent.bill_type+"_"+commodity.id+"_"+'true');
|
|
|
}
|
|
|
});
|
|
|
if (_this.processContents[(_this.processContents.length)-1].addBtnShow)
|
|
|
@@ -619,9 +619,9 @@
|
|
|
if (res.data.success){
|
|
|
let sum=0;
|
|
|
res.data.data.forEach(function (processContent) {
|
|
|
- if (!_this.commodityIds.includes(processContent.commodity_id+"_"+processContent.type)){
|
|
|
+ if (!_this.commodityIds.includes(processContent.bill_type+"_"+processContent.commodity_id+"_"+processContent.type)){
|
|
|
_this.processContents.push(processContent);
|
|
|
- _this.commodityIds.push(processContent.commodity_id+"_"+processContent.type);
|
|
|
+ _this.commodityIds.push(processContent.bill_type+"_"+processContent.commodity_id+"_"+processContent.type);
|
|
|
if (!processContent.type) sum += Number(processContent.amount);
|
|
|
if (processContent.owner_id && !_this.process.owner_id)
|
|
|
_this.process.owner_id = processContent.owner_id;
|