|
|
|
@ -112,7 +112,26 @@
|
|
|
|
|
<el-input v-model="formInline.sku" placeholder="请输入sku" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="货物名称" style="width: 40%"> |
|
|
|
|
<el-input v-model="formInline.descriptionGoods" placeholder="请输入货物名称" clearable /> |
|
|
|
|
<!-- <el-input v-model="formInline.descriptionGoods" placeholder="请输入货物名称" clearable />--> |
|
|
|
|
<el-select style="width: 100%" |
|
|
|
|
v-model="formInline.materialIdName" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
|
placeholder="请输入物料名称" |
|
|
|
|
:remote-method="remoteMethodName" |
|
|
|
|
@change="getMethodName($event,'1')" |
|
|
|
|
@blur="selectBlur" |
|
|
|
|
:loading="loading" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in optionsName" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="货物单位" style="width: 40%"> |
|
|
|
|
<el-select style="width: 100%;" |
|
|
|
@ -127,13 +146,19 @@
|
|
|
|
|
v-for="item in distributionUnit" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="规格" style="width: 40%"> |
|
|
|
|
<el-input v-model="formInline.cargoNorms" placeholder="请输入规格" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="产品编码" style="width: 40%"> |
|
|
|
|
<el-input v-model="formInline.cargoNumber" placeholder="请输入产品编码" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="包装数量" style="width: 40%"> |
|
|
|
|
<el-input v-model="formInline.packageNum" placeholder="请输入包装数量" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="拆箱数" style="width: 40%"> |
|
|
|
|
<el-input v-model="formInline.unpackingQuantity" placeholder="请输入拆箱数" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
@ -560,6 +585,7 @@ export default {
|
|
|
|
|
option: option, |
|
|
|
|
// 表单列表 |
|
|
|
|
data: [], |
|
|
|
|
optionsName: [], |
|
|
|
|
excelOption: { |
|
|
|
|
submitBtn: false, |
|
|
|
|
emptyBtn: false, |
|
|
|
@ -706,6 +732,56 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
selectBlur(e){ |
|
|
|
|
// console.log(">>>>>><<<<<<<",e); |
|
|
|
|
let value = e.target.value; // 输入框值 |
|
|
|
|
if(value) { // 只有输入才有这个值,下拉框选择的话 这个值为空 |
|
|
|
|
// this.form.produce = value; |
|
|
|
|
// console.log("获取的值",value); |
|
|
|
|
this.formInline.materialIdName = value; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 查询 |
|
|
|
|
* */ |
|
|
|
|
async remoteMethodName (query){ |
|
|
|
|
if (query) { |
|
|
|
|
this.loading = true; |
|
|
|
|
//查询物料数据 |
|
|
|
|
let asd = await getListMaterial(this.page.currentPage,this.page.pageSize,{ name: query,pid: this.stockList.materialId }).then(); |
|
|
|
|
console.log("物料信息",asd.data.data); |
|
|
|
|
if(!!asd.data.data){ |
|
|
|
|
this.optionsName =asd.data.data.records; |
|
|
|
|
} |
|
|
|
|
this.loading = false; |
|
|
|
|
} else { |
|
|
|
|
this.optionsName = []; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 物料选择赋值 |
|
|
|
|
* */ |
|
|
|
|
getMethodName(row,num){ |
|
|
|
|
console.log("名称选择事件",row); |
|
|
|
|
switch (num) { |
|
|
|
|
case '1': |
|
|
|
|
let a = this.optionsName.find( i => i.id == row); |
|
|
|
|
console.log("aaaa>>",a); |
|
|
|
|
if(!!a){ |
|
|
|
|
this.formInline.materialCode = a.productCode; |
|
|
|
|
this.formInline.cargoUnit = a.logpmUnit; |
|
|
|
|
this.formInline.cargoNorms = a.packingSpecification; |
|
|
|
|
this.formInline.cargoNumber = a.productCode; |
|
|
|
|
this.formInline.packageNum = a.packageNum; |
|
|
|
|
this.formInline.descriptionGoods = a.descriptionGoods; |
|
|
|
|
this.formInline.sku = a.sku; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case '2': |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
showdrawer(value){ |
|
|
|
|
this.drawerShow=value |
|
|
|
@ -820,8 +896,6 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
@ -851,20 +925,15 @@ export default {
|
|
|
|
|
// return ; |
|
|
|
|
// } |
|
|
|
|
if (!this.form.id) { |
|
|
|
|
/* const regex = /^\d+$/; |
|
|
|
|
if (regex.test(this.formInline.materialId)) { |
|
|
|
|
// console.log("全是数字"); |
|
|
|
|
asm.materialId = this.formInline.materialId |
|
|
|
|
} else { |
|
|
|
|
// console.log("包含非数字字符"); |
|
|
|
|
asm.materialId = this.formInline.materialCode; |
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
// if(this.selectionListDismantle.length > 0){ |
|
|
|
|
// console.log(this.selectionListDismantle); |
|
|
|
|
// let shi = []; |
|
|
|
|
// this.selectionListDismantle.forEach( i =>{ |
|
|
|
|
// let a = { |
|
|
|
|
// parcelsId : i.id, |
|
|
|
|
// unpackingQuantity : i.need |
|
|
|
|
// } |
|
|
|
|
// shi.push(a); |
|
|
|
|
// }) |
|
|
|
|
// this.form.parcels = shi; |
|
|
|
|
// } |
|
|
|
|
// console.log("提交了"); |
|
|
|
|
if(parseInt(this.formInline.unpackingQuantity) >parseInt(this.getQuery.quantityStock)){ |
|
|
|
|
this.$message.warning("拆包数量大于在库数量!!!") |
|
|
|
|
return ; |
|
|
|
@ -875,12 +944,11 @@ export default {
|
|
|
|
|
|
|
|
|
|
this.formInline.storeNum = parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity); |
|
|
|
|
} |
|
|
|
|
this.formInline.id =this.stockList.id; |
|
|
|
|
// this.formInline.id =this.stockList.id; |
|
|
|
|
this.formInline.materialId =this.stockList.materialId; |
|
|
|
|
this.formInline.marketId =this.stockList.marketId; |
|
|
|
|
this.formInline.storeId =!!this.stockList.storeId && this.stockList.storeId != '-1' ? this.stockList.storeId : null ; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log("提交的值",this.formInline); |
|
|
|
|
addParcels(this.formInline).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
@ -924,10 +992,12 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleViewDetails (row) { |
|
|
|
|
console.log("row>>>>",row.row); |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: '/distribution/inventory/distributionStockListDetails', |
|
|
|
|
query:{ |
|
|
|
|
id: row.row.id, |
|
|
|
|
marketId: row.row.marketId, |
|
|
|
|
materialId: row.row.materialId, |
|
|
|
|
name: row.row.descriptionGoods+" — 明细" |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -952,7 +1022,7 @@ export default {
|
|
|
|
|
console.log("adfadsfvasd",aa.data.data); |
|
|
|
|
this.getQuery = aa.data.data.records[0]; |
|
|
|
|
this.getQuery.quantityStock = row.row.quantityStock; |
|
|
|
|
this.formInline.descriptionGoods = this.getQuery.name; |
|
|
|
|
// this.formInline.descriptionGoods = this.getQuery.name; |
|
|
|
|
let q = this.distributionUnit.find( i => i.dictKey == this.getQuery.logpmUnit); |
|
|
|
|
this.getQuery.logpmUnitName = q.dictValue; |
|
|
|
|
// getListParcelDetails(this.pageDetails.currentPage,this.pageDetails.pageSize,par).then(res => { |
|
|
|
@ -1043,7 +1113,9 @@ export default {
|
|
|
|
|
this.data = data.records; |
|
|
|
|
this.data.forEach( i =>{ |
|
|
|
|
let a = this.distributionType.find( d =>d.dictKey == i.serviceType); |
|
|
|
|
i.serviceTypeName = a.dictValue; |
|
|
|
|
if(!!a){ |
|
|
|
|
i.serviceTypeName = a.dictValue; |
|
|
|
|
} |
|
|
|
|
if(i.unpack == false){ |
|
|
|
|
i.unpack = '否' |
|
|
|
|
}else{ |
|
|
|
|