|
|
|
@ -108,20 +108,47 @@
|
|
|
|
|
</div> |
|
|
|
|
<div style="border-width: 1px 0 0 0; border-style: solid; border-color: black;margin-top: 5%;padding-top: 2%;padding-left: 1%"> |
|
|
|
|
<el-form :inline="true" :model="formInline" class="demo-form-inline" label-width="100"> |
|
|
|
|
<el-form-item label="SKU" style="width: 40%"> |
|
|
|
|
<el-input v-model="formInline.sku" placeholder="请输入sku" clearable /> |
|
|
|
|
<el-form-item label="SKU" style="width: 40%"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formInline.sku" |
|
|
|
|
placeholder="请输入sku" |
|
|
|
|
clearable |
|
|
|
|
:disabled="Boolean(unpackFormDisable.sku)" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="货物名称" style="width: 40%"> |
|
|
|
|
<el-input v-model="formInline.descriptionGoods" placeholder="请输入货物名称" clearable /> |
|
|
|
|
<el-form-item label="货物名称" style="width: 40%"> |
|
|
|
|
<!-- <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" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<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%;" |
|
|
|
|
v-model="formInline.cargoUnit" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
|
remote-show-suffix |
|
|
|
|
placeholder="请选择货物单位" |
|
|
|
|
<el-form-item label="货物单位" style="width: 40%"> |
|
|
|
|
<el-select |
|
|
|
|
style="width: 100%" |
|
|
|
|
v-model="formInline.cargoUnit" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
|
remote-show-suffix |
|
|
|
|
placeholder="请选择货物单位" |
|
|
|
|
:disabled="Boolean(unpackFormDisable.cargoUnit)" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in distributionUnit" |
|
|
|
@ -132,10 +159,35 @@
|
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="规格" style="width: 40%"> |
|
|
|
|
<el-input v-model="formInline.cargoNorms" placeholder="请输入规格" clearable /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formInline.cargoNorms" |
|
|
|
|
placeholder="请输入规格" |
|
|
|
|
clearable |
|
|
|
|
:disabled="Boolean(unpackFormDisable.cargoNorms)" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="产品编码" style="width: 40%"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formInline.cargoNumber" |
|
|
|
|
placeholder="请输入产品编码" |
|
|
|
|
clearable |
|
|
|
|
:disabled="Boolean(unpackFormDisable.cargoNumber)" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="包装数量" style="width: 40%"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formInline.packageNum" |
|
|
|
|
placeholder="请输入包装数量" |
|
|
|
|
clearable |
|
|
|
|
:disabled="Boolean(unpackFormDisable.packageNum)" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="拆箱数" style="width: 40%"> |
|
|
|
|
<el-input v-model="formInline.unpackingQuantity" placeholder="请输入拆箱数" clearable /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formInline.unpackingQuantity" |
|
|
|
|
placeholder="请输入拆箱数" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -240,13 +292,17 @@ export default {
|
|
|
|
|
drawerShow: false, |
|
|
|
|
distributionType:[], |
|
|
|
|
distributionUnit:[], |
|
|
|
|
// 拆包表单内输入框哪些禁止输入 |
|
|
|
|
unpackFormDisable: {}, |
|
|
|
|
// 拆包名称下拉 选择 |
|
|
|
|
optionsName: [], |
|
|
|
|
columnList: [ |
|
|
|
|
{ |
|
|
|
|
prop: '', |
|
|
|
|
label: '序号', |
|
|
|
|
label: '全选', |
|
|
|
|
type: 0, |
|
|
|
|
values: '', |
|
|
|
|
width: 55, |
|
|
|
|
width: "55", |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: true, |
|
|
|
|
}, |
|
|
|
@ -706,7 +762,63 @@ 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) { |
|
|
|
|
if (!row) { |
|
|
|
|
this.formInline = {}; |
|
|
|
|
this.unpackFormDisable = {}; |
|
|
|
|
} |
|
|
|
|
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; |
|
|
|
|
this.unpackFormDisable = this.formInline; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case '2': |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
showdrawer(value){ |
|
|
|
|
this.drawerShow=value |
|
|
|
|
}, |
|
|
|
@ -872,7 +984,7 @@ export default {
|
|
|
|
|
this.formInline.marketId =this.stockList.marketId; |
|
|
|
|
this.formInline.storeId =this.stockList.storeId; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formInline.descriptionGoods = '' |
|
|
|
|
console.log("提交的值",this.formInline); |
|
|
|
|
addParcels(this.formInline).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|