|
|
|
@ -109,16 +109,35 @@
|
|
|
|
|
<!-- />--> |
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<el-form-item label="发站仓库" prop="sendWarehourseId"> |
|
|
|
|
<el-form-item label="发站仓库" prop="sendWarehouseIds"> |
|
|
|
|
<!-- <el-input v-model="form.forwardingUnit" placeholder="请输入发货单位"/>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-select |
|
|
|
|
v-model="form.sendWarehouseId" |
|
|
|
|
<el-select v-if="viewUpdate" |
|
|
|
|
v-model="form.sendWarehouseIds" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
multiple |
|
|
|
|
reserve-keyword |
|
|
|
|
placeholder="请选择发站仓库" |
|
|
|
|
placeholder="请输入发站仓库" |
|
|
|
|
:remote-method="remoteWarehouseList" |
|
|
|
|
:loading="loading" |
|
|
|
|
style = "width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in warehouseOptions" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
<el-select v-if="!viewUpdate" |
|
|
|
|
v-model="form.sendWarehouseIds" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
|
placeholder="请输入发站仓库" |
|
|
|
|
:remote-method="remoteWarehouseList" |
|
|
|
|
:loading="loading" |
|
|
|
|
style = "width: 100%" |
|
|
|
@ -133,20 +152,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="服务仓库" prop="serveWarehourseId"> |
|
|
|
|
|
|
|
|
|
<el-form-item label="服务仓库" prop="serveWarehouseId"> |
|
|
|
|
|
|
|
|
|
<el-select |
|
|
|
|
v-model="form.serveWarehouseId" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
|
placeholder="请选择服务仓库" |
|
|
|
|
:remote-method="remoteWarehouseList" |
|
|
|
|
placeholder="请输入服务仓库" |
|
|
|
|
:remote-method="remoteServeWarehouseList" |
|
|
|
|
:loading="loading" |
|
|
|
|
style = "width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in warehouseOptions" |
|
|
|
|
v-for="item in warehouseServeOptions" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
@ -175,7 +194,7 @@ import option from "@/option/basicdata/basicStorageServices";
|
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import { getLister } from '@/api/basicdata/basicShop'; |
|
|
|
|
import { getListStore } from '@/api/basicdata/basicStoreContact'; |
|
|
|
|
import { getWarehouseList } from '@/api/basicdata/basicdataWarehouse'; |
|
|
|
|
import { getListCopy, getWarehouseList } from '@/api/basicdata/basicdataWarehouse'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
@ -191,6 +210,7 @@ export default {
|
|
|
|
|
loading: true, |
|
|
|
|
// 是否为查看模式 |
|
|
|
|
view: false, |
|
|
|
|
viewUpdate: true, |
|
|
|
|
// 查询信息 |
|
|
|
|
query: {}, |
|
|
|
|
// 分页信息 |
|
|
|
@ -210,12 +230,13 @@ export default {
|
|
|
|
|
optionser: [], |
|
|
|
|
options: [], |
|
|
|
|
warehouseOptions: [], |
|
|
|
|
warehouseServeOptions: [], |
|
|
|
|
rules: { |
|
|
|
|
clientId: [ |
|
|
|
|
{ required: true, message: '请输入门店名称', trigger: 'blur' }, |
|
|
|
|
// { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
sendWarehouseId: [ |
|
|
|
|
sendWarehouseIds: [ |
|
|
|
|
{ required: true, message: '请选择发站仓', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
serveWarehouseId: [ |
|
|
|
@ -272,6 +293,15 @@ export default {
|
|
|
|
|
this.warehouseOptions = st.data.data; |
|
|
|
|
console.log(">>>>",this.warehouseOptions); |
|
|
|
|
}, |
|
|
|
|
async remoteServeWarehouseList(row){ |
|
|
|
|
let a = { |
|
|
|
|
name : !!row ? row : null |
|
|
|
|
} |
|
|
|
|
console.log("aaa",a); |
|
|
|
|
let st =await getListCopy(this.page.currentPage, this.page.pageSize, a); |
|
|
|
|
this.warehouseServeOptions = st.data.data.records; |
|
|
|
|
console.log(">>>>",this.warehouseServeOptions); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
init () { |
|
|
|
|
this.height = this.setPx(document.body.clientHeight - 340); |
|
|
|
@ -295,6 +325,8 @@ export default {
|
|
|
|
|
if(!!this.$route.query.type ){ |
|
|
|
|
this.form.distinguish = this.$route.query.type |
|
|
|
|
} |
|
|
|
|
// this.form.sendWarehouseIds = this.form.sendWarehouseIds.join(","); |
|
|
|
|
console.log(">>>",this.form); |
|
|
|
|
add(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
@ -310,6 +342,9 @@ export default {
|
|
|
|
|
if(this.form.forwardingUnit.length < 10){ |
|
|
|
|
this.form.forwardingUnit = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.form.sendWarehouseId = this.form.sendWarehouseIds; |
|
|
|
|
this.form.sendWarehouseIds = null; |
|
|
|
|
update(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
@ -325,17 +360,25 @@ export default {
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
handleAdd () { |
|
|
|
|
this.title = '新增' |
|
|
|
|
this.title = '新增'; |
|
|
|
|
this.viewUpdate = true; |
|
|
|
|
this.form = {} |
|
|
|
|
this.box = true |
|
|
|
|
this.box = true; |
|
|
|
|
this.remoteWarehouseList(); |
|
|
|
|
this.remoteServeWarehouseList(); |
|
|
|
|
}, |
|
|
|
|
handleEdit (row) { |
|
|
|
|
this.title = '编辑' |
|
|
|
|
this.title = '编辑'; |
|
|
|
|
this.viewUpdate = false; |
|
|
|
|
this.box = true |
|
|
|
|
this.remoteWarehouseList(); |
|
|
|
|
this.remoteServeWarehouseList(); |
|
|
|
|
getDetail(row.id).then(res => { |
|
|
|
|
console.log("编辑<<<<<",res.data.data); |
|
|
|
|
this.form = res.data.data; |
|
|
|
|
this.form.shopId = row.storeName; |
|
|
|
|
this.form.forwardingUnit = row.linkman; |
|
|
|
|
this.form.sendWarehouseIds = row.sendWarehouseId; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleView (row) { |
|
|
|
@ -343,10 +386,14 @@ export default {
|
|
|
|
|
this.title = '查看' |
|
|
|
|
this.view = true; |
|
|
|
|
this.box = true; |
|
|
|
|
this.remoteWarehouseList(); |
|
|
|
|
this.remoteWarehouseList(); |
|
|
|
|
getDetail(row.id).then(res => { |
|
|
|
|
this.form = res.data.data; |
|
|
|
|
this.form.shopId = row.storeName; |
|
|
|
|
this.form.forwardingUnit = row.linkman; |
|
|
|
|
this.form.sendWarehouseIds = row.sendWarehouseId; |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDelete () { |
|
|
|
|