Commit 66d8aa5e authored by 黄卓's avatar 黄卓

选择储位,缺少储位回显

parent c0db04e0
......@@ -61,14 +61,14 @@ export default {
type: Boolean,
default: false
},
value: String
value: Array,
orderId: Number
},
data() {
return {
opened: false,
orderId: '',
area: [],
activeName: '0',
selectedWarehouse: [],
......@@ -94,7 +94,7 @@ export default {
methods: {
handleSubmit() {
this.$emit('input', this.selected.join(','))
this.$emit('input', this.inputValue)
this.opened = false
},
handleClose() {},
......@@ -168,6 +168,7 @@ export default {
},
computed: {
// code array
selected() {
const result = []
......@@ -178,15 +179,50 @@ export default {
if (f.selected) result.push(f.code)
f.positionList.forEach(g => {
// 位置
if (g.selected) result.push(k.code)
g.children.forEach(k => {
// 子位置
if (k.selected) result.push(k.code)
})
})
})
})
return result
},
inputValue(){
const result = []
this.area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
if (f.selected) result.push({
orderId: this.orderId,
wareId: f.pid,
areaId: f.id
})
else f.positionList.forEach(g => {
// 位置
if (g.selected) result.push({
orderId: this.orderId,
wareId: g.domainId,
areaId: g.areaId,
locationId: g.id
})
else g.children.forEach(k => {
// 子位置
if (k.selected) result.push({
orderId: this.orderId,
wareId: k.domainId,
areaId: k.areaId,
locationId: k.id
})
})
})
})
})
return result
}
}
......
......@@ -5,7 +5,8 @@
<order-base-info :order="order"></order-base-info>
<div style="margin-top: 20px">
<span>储位:{{ locationName }}</span><el-button type="primary" size="mini" @click="areaVisible = true" style="margin-left: 15px">选择</el-button>
<span>储位:{{ ($refs.area ? $refs.area.selected : []).join(',') }}</span>
<el-button type="primary" size="mini" @click="areaVisible = true" style="margin-left: 15px">选择</el-button>
</div>
<h2>货物信息</h2>
......@@ -90,7 +91,7 @@
</div>
</el-form>
<warehouse-area-dialog :visible.sync="areaVisible" v-model="locationName"></warehouse-area-dialog>
<warehouse-area-dialog ref="area" :visible.sync="areaVisible" v-model="form.orderLocationCreateReqVOList" :order-id="orderId"></warehouse-area-dialog>
<edit-dialog :visible.sync="warehousingVisible" :warehousing="warehousing"></edit-dialog>
......@@ -140,7 +141,7 @@ export default {
mounted() {
if(this.$route.query.id){
this.orderId = this.$route.query.id
this.orderId = parseInt(this.$route.query.id || undefined)
getOrder(this.orderId).then(r => this.order = r.data)
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
......@@ -153,7 +154,6 @@ export default {
DICT_TYPE,
areaVisible: false,
finishVisible: false,
locationName: '',
warehousingVisible: false,
form: {
orderSpecialNeedReceivableReqVoList: []
......@@ -172,7 +172,7 @@ export default {
handleSubmit() {
orderWarehouseInFinish({
orderSpecialNeedReceivableReqVoList: this.form.orderSpecialNeedReceivableReqVoList,
"locationName": this.locationName,
"orderLocationCreateReqVOList": this.form.orderLocationCreateReqVOList,
"orderId": this.order.orderId
}).then(r => {
if (r.data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment