|
|
@@ -7,6 +7,30 @@
|
|
|
<div class="container-fluid" id="list">
|
|
|
<div class="card col-md-8 offset-md-2">
|
|
|
<div class="card-body">
|
|
|
+ <div class="modal fade" id="pasteData" tabindex="-1" role="dialog" aria-labelledby="pasteDataTitle" aria-hidden="true">
|
|
|
+ <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <div class="row modal-title font-weight-bold w-100 text-nowrap ml-1" id="pasteDataTitle">
|
|
|
+ <label class="col-2 text-danger">货主</label>
|
|
|
+ <label class="col-2">单据</label>
|
|
|
+ <label class="col-2 text-danger">品名</label>
|
|
|
+ <label class="col-2">SKU</label>
|
|
|
+ <label class="col-2">条码</label>
|
|
|
+ <label class="col-2 text-danger">数量</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <textarea class="w-100" style="height: 400px;" v-model="pasteData">
|
|
|
+
|
|
|
+ </textarea>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button class="btn btn-dark" @click="importPasteData()">开始导入</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="row">
|
|
|
<div class="col-6 rounded mb-2 border" style="background: #efe3d9;">
|
|
|
<div class="form-group row mt-2">
|
|
|
@@ -19,7 +43,14 @@
|
|
|
<div class="row pt-2 small"><label class="col-3 text-right" >单据号</label>
|
|
|
<b class="col-8" v-if="processContents.length>0 && processContents[0].addBtnShow && !processContents[0].type">@{{ processContents[0].wms_code }}</b></div> <!---->
|
|
|
<div class="row pt-2" v-if="processContents.length>0 && processContents[0].addBtnShow && !processContents[0].type">
|
|
|
- <span class="col-12 text-center text-muted small">双击选择商品:</span>
|
|
|
+ <span class="col-12 text-center text-muted small">双击选择商品:
|
|
|
+ <button class="btn btn-sm btn-outline-info ml-1 mt-0" style="transform: scale(0.8)"
|
|
|
+ @click="addAll(processContents[0])"
|
|
|
+ >添加所有</button>
|
|
|
+ <button class="btn btn-sm btn-outline-dark ml-1 mt-0" style="transform: scale(0.8)"
|
|
|
+ data-toggle="modal" data-target="#pasteData"
|
|
|
+ >外部导入</button>
|
|
|
+ </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' : ''}]"
|
|
|
@@ -237,7 +268,8 @@
|
|
|
msg:false,
|
|
|
commodityIds:[],
|
|
|
is_delBtn:[],
|
|
|
- sum:0
|
|
|
+ sum:0,
|
|
|
+ pasteData:'',
|
|
|
},
|
|
|
watch:{
|
|
|
processContents:{
|
|
|
@@ -502,6 +534,38 @@
|
|
|
update_commodity_name(processContent){
|
|
|
this.$set(processContent,'is_update_commodity_name',true);
|
|
|
},
|
|
|
+ //添加所有
|
|
|
+ addAll(processContent){
|
|
|
+ let _this=this;
|
|
|
+ processContent.commodities.forEach(function (commodity) {
|
|
|
+ if (!_this.commodityIds.includes(commodity.id+"_"+processContent.type)){
|
|
|
+ let content={};
|
|
|
+ content['bill_type'] = processContent.bill_type ;
|
|
|
+ content['commodity_id'] = commodity.id ;
|
|
|
+ content['wms_code'] = processContent.wms_code ;
|
|
|
+ content['amount'] = commodity.amount ;
|
|
|
+ content['commodity_name'] = commodity.name ;
|
|
|
+ content['commodity_barcodes'] = commodity.barcodes ;
|
|
|
+ content['commodity_sku'] = commodity.sku ;
|
|
|
+ content['lineNo'] = commodity.lineNo ;
|
|
|
+ content['owner_id'] = commodity.owner_id ;
|
|
|
+ content['owner_name'] = commodity.owner_name ;
|
|
|
+ content['addBtnShow'] = false ;
|
|
|
+ content['type'] = processContent.type ;
|
|
|
+ _this.processContents.unshift(content);
|
|
|
+ _this.commodityIds.push(commodity.id+"_"+processContent.type);
|
|
|
+ _this.sum += Number(commodity.amount);
|
|
|
+ };
|
|
|
+ });
|
|
|
+ },
|
|
|
+ importPasteData(){
|
|
|
+ if (!this.pasteData){
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('文本为空!');
|
|
|
+ }
|
|
|
+ axios.post('{{url('process/importPasteData')}}',{data:this.pasteData})
|
|
|
+ .then(res=>{}).catch(err=>{});
|
|
|
+ }
|
|
|
},
|
|
|
});
|
|
|
</script>
|