|
|
|
@ -29,10 +29,10 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="客户名称" prop="customerName"> |
|
|
|
|
<el-form-item label="客户名称" prop="clientId"> |
|
|
|
|
<!-- <el-input v-model="form.customerName" placeholder="请输入客户名称"/>--> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.customerName" |
|
|
|
|
v-model="form.clientId" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
@ -52,10 +52,10 @@
|
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="客户编码" prop="clientId"> |
|
|
|
|
<el-form-item label="客户编码" prop="clientCode"> |
|
|
|
|
<!-- <el-input v-model="form.customerName" placeholder="请输入客户名称"/>--> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.clientId" |
|
|
|
|
v-model="form.clientCode" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
@ -531,13 +531,13 @@ export default {
|
|
|
|
|
receiptDate: [ |
|
|
|
|
{ type: 'date', required: true, message: '请选择入库时间', trigger: 'change' }, |
|
|
|
|
], |
|
|
|
|
customerName: [{ required: true, message: '请填写客户名称', trigger: 'blur' }], |
|
|
|
|
clientId: [{ required: true, message: '请填写客户名称', trigger: 'blur' }], |
|
|
|
|
storeId: [{ required: true, message: '请填写门店名称', trigger: 'blur' }], |
|
|
|
|
trainNumber: [{ required: true, message: '请填写物流单号', trigger: 'blur' }], |
|
|
|
|
licensePlate: [{ required: true, message: '请填写入库车牌', trigger: 'change' }], |
|
|
|
|
warehouseId: [{ required: true, message: '请选择所在仓库', trigger: 'blur' }], |
|
|
|
|
serviceType: [{ required: true, message: '请选择服务类型', trigger: 'blur' }], |
|
|
|
|
clientId: [{ required: true, message: '请选择客户编码', trigger: 'blur' }], |
|
|
|
|
clientCode: [{ required: true, message: '请选择客户编码', trigger: 'blur' }], |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -556,7 +556,7 @@ export default {
|
|
|
|
|
deep: true, |
|
|
|
|
immediate: true, |
|
|
|
|
}, |
|
|
|
|
// 'form.customerName': { |
|
|
|
|
// 'form.clientId': { |
|
|
|
|
// handler(newVal) { |
|
|
|
|
// console.log("newVal>>>>>>>>>>>>>>>",newVal) |
|
|
|
|
// console.log("this.options>>>>>>>>>>>>>>>",this.options) |
|
|
|
@ -585,49 +585,51 @@ export default {
|
|
|
|
|
|
|
|
|
|
//查询详情信息 |
|
|
|
|
async getOwnDeliver() { |
|
|
|
|
let {id, type} = this.$route.query; |
|
|
|
|
if (!!id) { |
|
|
|
|
let a = this.$route.query.id; |
|
|
|
|
let ty = this.$route.query.type; |
|
|
|
|
if (!!a) { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.stuffCode = []; |
|
|
|
|
this.stuffName = []; |
|
|
|
|
this.store = []; |
|
|
|
|
|
|
|
|
|
let res = await getWarehouseDetail(id); |
|
|
|
|
console.log('bbbb>>>>', res.data.data); |
|
|
|
|
const {data} = res.data; |
|
|
|
|
let b = await getWarehouseDetail(a); |
|
|
|
|
console.log('bbbb>>>>', b.data.data); |
|
|
|
|
const da = b.data.data; |
|
|
|
|
|
|
|
|
|
this.options.push({ |
|
|
|
|
label: data.customerName, |
|
|
|
|
value: data.customerName, |
|
|
|
|
label: da.customerName, |
|
|
|
|
value: da.clientId, |
|
|
|
|
}); |
|
|
|
|
this.optionCodes.push({ |
|
|
|
|
label: data.clientId, |
|
|
|
|
value: data.clientId, |
|
|
|
|
label: da.customerCode, |
|
|
|
|
value: da.clientId, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if (!!data.storeId && data.storeId != '-1') { |
|
|
|
|
if (!!da.storeId && da.storeId != '-1') { |
|
|
|
|
console.log('门店》》》》'); |
|
|
|
|
this.shop.push({ |
|
|
|
|
label: data.storeName, |
|
|
|
|
value: data.storeId, |
|
|
|
|
label: da.storeName, |
|
|
|
|
value: da.storeId, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.store.length < 1) { |
|
|
|
|
this.store.push({ |
|
|
|
|
label: !!data.warehouse ? data.warehouse : null, |
|
|
|
|
value: !!data.warehouseId ? data.warehouseId : null, |
|
|
|
|
label: !!da.warehouse ? da.warehouse : null, |
|
|
|
|
value: !!da.warehouseId ? da.warehouseId : null, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.form = data; |
|
|
|
|
this.form = da; |
|
|
|
|
console.log('da :>> ', da); |
|
|
|
|
// console.log(">>>>>>",this.form.storeId); |
|
|
|
|
if (!!this.form.storeId && parseInt(this.form.storeId) == -1) { |
|
|
|
|
console.log('>>>>>>', this.form.storeId); |
|
|
|
|
this.form.storeId = null; |
|
|
|
|
} |
|
|
|
|
this.data = data.list; |
|
|
|
|
this.data = da.list; |
|
|
|
|
this.loading = false; |
|
|
|
|
if (!!type && type == '2') { |
|
|
|
|
if (!!ty && ty == '2') { |
|
|
|
|
this.view = false; |
|
|
|
|
} else { |
|
|
|
|
this.typeView = true; |
|
|
|
@ -725,9 +727,9 @@ export default {
|
|
|
|
|
//查询品牌信息 |
|
|
|
|
async getBrandName(query) { |
|
|
|
|
if (query) { |
|
|
|
|
console.log('客户ID', this.form.customerName); |
|
|
|
|
if (!!this.form.customerName) { |
|
|
|
|
let si = !!this.form.storeId ? this.form.storeId : this.form.customerName; |
|
|
|
|
console.log('客户ID', this.form.clientId); |
|
|
|
|
if (!!this.form.clientId) { |
|
|
|
|
let si = !!this.form.storeId ? this.form.storeId : this.form.clientId; |
|
|
|
|
let cl = await getListIdsName(this.page.currentPage, this.page.pageSize, { |
|
|
|
|
brandName: query, |
|
|
|
|
ids: si, |
|
|
|
@ -778,7 +780,7 @@ export default {
|
|
|
|
|
label: obj.code, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
this.form.clientId = obj.value; |
|
|
|
|
this.form.clientCode = obj.value; |
|
|
|
|
} else { |
|
|
|
|
const obj = this.optionCodes.find(item => item.value === row); |
|
|
|
|
console.log('obj>>>>>>>>>>>', obj); |
|
|
|
@ -789,7 +791,7 @@ export default {
|
|
|
|
|
label: obj.code, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
this.form.customerName = obj.value; |
|
|
|
|
this.form.clientId = obj.value; |
|
|
|
|
} |
|
|
|
|
this.form.serviceType = null; |
|
|
|
|
let aa = ''; |
|
|
|
@ -804,13 +806,13 @@ export default {
|
|
|
|
|
this.optionCodes.some(i => { |
|
|
|
|
console.log('>><><><<>', i); |
|
|
|
|
if (i.value == row) { |
|
|
|
|
this.form.clientId = i.label; |
|
|
|
|
this.form.clientCode = i.label; |
|
|
|
|
//查询客户服务类型 |
|
|
|
|
aa = i.value; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
let bu = await getListName(this.page.currentPage, this.page.pageSize, { |
|
|
|
|
customerName: aa, |
|
|
|
|
clientId: aa, |
|
|
|
|
typeService: '3', |
|
|
|
|
}); |
|
|
|
|
// console.log("bububu",bu.data.data.records); |
|
|
|
@ -887,7 +889,6 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
//客户编号 |
|
|
|
|
async remoteCodeMethod(query) { |
|
|
|
|
console.log('query :>> ', query); |
|
|
|
|
if (query) { |
|
|
|
|
// this.loading = true; |
|
|
|
|
this.optionCodes = []; |
|
|
|
@ -897,9 +898,9 @@ export default {
|
|
|
|
|
console.log('客户信息1234>>>>', cl.data.data.records); |
|
|
|
|
cl.data.data.records.forEach(i => { |
|
|
|
|
let st = { |
|
|
|
|
label: i.clientName, |
|
|
|
|
label: i.clientCode, |
|
|
|
|
value: i.id, |
|
|
|
|
code: i.clientCode, |
|
|
|
|
code: i.clientName, |
|
|
|
|
}; |
|
|
|
|
this.optionCodes.push(st); |
|
|
|
|
}); |
|
|
|
@ -1224,7 +1225,7 @@ export default {
|
|
|
|
|
}; |
|
|
|
|
this.store.push(st); |
|
|
|
|
// 如果仓库只有一条数据时, 直接回显 |
|
|
|
|
if (this.store.length === 1 && !this.form.warehouseId) { |
|
|
|
|
if (this.store.length === 1) { |
|
|
|
|
console.log('this.store.length :>> ', [...this.store]); |
|
|
|
|
this.form.warehouseId = this.store[0].value;} |
|
|
|
|
}); |
|
|
|
@ -1256,14 +1257,13 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}*/ |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 获取列表数据 |
|
|
|
|
async getListData(data){ |
|
|
|
|
data.currentPage = data.currentPage || 1; // 当前页码, 默认为1 |
|
|
|
|
data.pageSize = data.pageSize || 10; // 当前页数, 默认为10 |
|
|
|
|
const res = await getList(data.currentPage, data.pageSize, {conditions: data.conditions}) |
|
|
|
|
// 抛出数据 |
|
|
|
|
return res |
|
|
|
|
data.currentPage = data.currentPage || 1; // 当前页码, 默认为1 |
|
|
|
|
data.pageSize = data.pageSize || 10; // 当前页数, 默认为10 |
|
|
|
|
const res = await getList(data.currentPage, data.pageSize, {conditions: data.conditions}) |
|
|
|
|
// 抛出数据 |
|
|
|
|
return res |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|