|
|
|
@ -21,10 +21,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 |
|
|
|
@ -42,14 +42,16 @@
|
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="门店名称" prop="storeName"> |
|
|
|
|
<!-- <el-form-item label="门店名称" prop="storeName">--> |
|
|
|
|
<el-form-item label="门店名称" > |
|
|
|
|
<!-- <el-input v-model="form.storeName" placeholder="请输入门店名称"/>--> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.storeName" |
|
|
|
|
v-model="form.storeId" |
|
|
|
|
filterable |
|
|
|
|
allow-create |
|
|
|
|
default-first-option |
|
|
|
|
:reserve-keyword="false" |
|
|
|
|
@change="getMen($event,1)" |
|
|
|
|
placeholder="请输入门店名称" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
@ -62,11 +64,13 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="物流单号" prop="trainNumber"> |
|
|
|
|
<!-- <el-form-item label="物流单号" prop="trainNumber">--> |
|
|
|
|
<el-form-item label="物流单号" > |
|
|
|
|
<el-input v-model="form.trainNumber" placeholder="请输入物流车次"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="入库车牌" prop="licensePlate"> |
|
|
|
|
<!-- <el-form-item label="入库车牌" prop="licensePlate">--> |
|
|
|
|
<el-form-item label="入库车牌" > |
|
|
|
|
<el-input v-model="form.licensePlate" placeholder="请输入入库车牌"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
@ -78,14 +82,15 @@
|
|
|
|
|
<!-- <el-input v-model="form.waybillNumber" placeholder="请输入运单号"/>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
|
|
<el-form-item label="所在仓库" prop="warehouse"> |
|
|
|
|
<el-form-item label="所在仓库" prop="warehouseId"> |
|
|
|
|
<!-- <el-input placeholder="请输入所在仓库"/>--> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.warehouse" |
|
|
|
|
v-model="form.warehouseId" |
|
|
|
|
filterable |
|
|
|
|
allow-create |
|
|
|
|
default-first-option |
|
|
|
|
:reserve-keyword="false" |
|
|
|
|
@change="getMen($event,2)" |
|
|
|
|
placeholder="请输入所在仓库" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
@ -276,7 +281,7 @@
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getDetail, add, update, remove} from "@/api/warehouse/warehouseWarehousingEntry"; |
|
|
|
|
import { getDetail, add, update, remove,getWarehouseDetail} from "@/api/warehouse/warehouseWarehousingEntry"; |
|
|
|
|
import option from "@/option/warehouse/warehouseWarehousingDetail"; |
|
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
@ -366,10 +371,10 @@ export default {
|
|
|
|
|
receiptDate: [ |
|
|
|
|
{ type: 'date', required: true, message: '请选择入库时间', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
customerName: [ |
|
|
|
|
clientId: [ |
|
|
|
|
{ required: true, message: '请填写客户名称', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
storeName: [ |
|
|
|
|
storeId: [ |
|
|
|
|
{ required: true, message: '请填写门店名称', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
trainNumber: [ |
|
|
|
@ -378,7 +383,7 @@ export default {
|
|
|
|
|
licensePlate: [ |
|
|
|
|
{ required: true, message: '请填写入库车牌', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
warehouse: [ |
|
|
|
|
warehouseId: [ |
|
|
|
|
{ required: true, message: '请选择所在仓库', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
serviceType: [ |
|
|
|
@ -392,6 +397,16 @@ export default {
|
|
|
|
|
this.init(); |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
watch:{ |
|
|
|
|
'$route.query.id': { |
|
|
|
|
handler(newVal, oldVal) { |
|
|
|
|
// console.log(newVal, oldVal); |
|
|
|
|
this.getOwnDeliver(); |
|
|
|
|
}, |
|
|
|
|
deep: true, |
|
|
|
|
immediate: true |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(["permission"]), |
|
|
|
|
ids () { |
|
|
|
@ -403,6 +418,14 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//查询详情信息 |
|
|
|
|
async getOwnDeliver(){ |
|
|
|
|
let a = this.$route.query.id; |
|
|
|
|
if(!a){ |
|
|
|
|
let b = await getWarehouseDetail(a); |
|
|
|
|
console.log("bb",b.data.data); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//物品名称 |
|
|
|
|
async remoteMethodStuffName(query){ |
|
|
|
|
if (query) { |
|
|
|
@ -424,6 +447,7 @@ export default {
|
|
|
|
|
//物品名称回显 |
|
|
|
|
async getMenDianName(row,ty){ |
|
|
|
|
// console.log("值阿德飒飒的",row); |
|
|
|
|
this.formDetail.materialId = row; |
|
|
|
|
this.stuff.some( i =>{ |
|
|
|
|
if(ty == 1){ |
|
|
|
|
if(i.id == row){ |
|
|
|
@ -475,10 +499,38 @@ export default {
|
|
|
|
|
} else { |
|
|
|
|
this.stuffCode = [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//门店查询 |
|
|
|
|
async getMen(row,type){ |
|
|
|
|
if(type == 1){ |
|
|
|
|
this.shop.some(i =>{ |
|
|
|
|
if(i.value == row){ |
|
|
|
|
this.form.storeName = i.label; |
|
|
|
|
return ; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else if(type == 2) { |
|
|
|
|
this.store.some(i =>{ |
|
|
|
|
if(i.value == row){ |
|
|
|
|
this.form.warehouse = i.label; |
|
|
|
|
return ; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//门店查询 |
|
|
|
|
async getMenDian(row){ |
|
|
|
|
// console.log("值阿德飒飒的",row); |
|
|
|
|
|
|
|
|
|
this.options.some(i =>{ |
|
|
|
|
if(i.value == row){ |
|
|
|
|
this.form.customerName = i.label; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
let cl = await getListClient(this.page.currentPage, this.page.pageSize,{pid:row}); |
|
|
|
|
// console.log(">>>>",cl.data.data.records); |
|
|
|
|
cl.data.data.records.forEach(i =>{ |
|
|
|
@ -524,6 +576,16 @@ export default {
|
|
|
|
|
this.$refs.formDetail.validate(valid=>{ |
|
|
|
|
if (valid) { |
|
|
|
|
console.log(this.formDetail); |
|
|
|
|
this.stuff.some( i =>{ |
|
|
|
|
console.log(i); |
|
|
|
|
if(i.id == this.formDetail.productName){ |
|
|
|
|
this.formDetail.productName = i.name; |
|
|
|
|
} |
|
|
|
|
if(i.id == this.formDetail.productCode){ |
|
|
|
|
this.formDetail.productCode = i.productCode; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
if( this.data.length > 0 ){ |
|
|
|
|
if(!this.formDetail.createInventory){ |
|
|
|
|
let s = false; |
|
|
|
@ -533,7 +595,6 @@ export default {
|
|
|
|
|
i.createInventory = parseInt(i.createInventory) + parseInt(this.formDetail.createInventory); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if(!s){ |
|
|
|
|
this.data.push(this.formDetail) |
|
|
|
|
} |
|
|
|
|