Browse Source

完善旧件入库

master
guoxing 9 months ago
parent
commit
44dd6cad4e
  1. 80
      yxt-as-ui/src/views/storage/oldPartsRecovery/oldPartsRecoveryAdd.vue
  2. 2
      yxt-as-ui/src/views/storage/oldPartsRecovery/repairbillInfo.vue

80
yxt-as-ui/src/views/storage/oldPartsRecovery/oldPartsRecoveryAdd.vue

@ -38,11 +38,15 @@
<div class="title titleOne">
<div>待上架旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.list" border>
<el-table v-loading="listLoading" :data="list" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column label="商品编码" align="center" width="180">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.goodsSkuCode" clearable placeholder="" />
</template>
</el-table-column>
<el-table-column prop="manufacturerName" label="厂家" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
@ -98,7 +102,14 @@
return {
listLoading: false,
submitdisabled: false,
formobj: {},
formobj: {
billNo: "",
customerName: "",
vehMark: "",
vinNo: "",
},
list: [],
warehouseList: [],
warehouseAreaList: [],
warehouseRackList: []
@ -180,8 +191,56 @@
this.$refs['form_obj'].validate((valid) => {
if (valid) {
for (var i in this.list) {
var item = this.list[i]
if (item.goodsSkuCode == '') {
this.$message({
showClose: true,
type: 'warning',
message: '商品编码不能为空'
})
return
}
if (item.warehouseSid == '' || item.warehouseName == '') {
this.$message({
showClose: true,
type: 'warning',
message: '仓库不能为空'
})
return
}
if (item.warehouseAreaSid == '' || item.warehouseAreaName == '') {
this.$message({
showClose: true,
type: 'warning',
message: '库区不能为空'
})
return
}
if (item.warehouseRackSid == '' || item.warehouseRackCode == '') {
this.$message({
showClose: true,
type: 'warning',
message: '库位不能为空'
})
return
}
}
var info = {
createBySid: window.sessionStorage.getItem('userSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
oldList: this.list
}
this.submitdisabled = true
req.saveInventory(this.formobj).then((res) => {
req.saveInventory(info).then((res) => {
if (res.success) {
this.$message({
showClose: true,
@ -202,8 +261,14 @@
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
billNo: "",
customerName: "",
vehMark: "",
vinNo: "",
},
this.list = []
}
this.submitdisabled = false
this.$emit('doback')
},
@ -214,15 +279,16 @@
var params = {
busRepairBillSid: row.billSid
}
this.formobj = row
req.getOldDetailsByBillSid(params)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
this.list = resp.data
}
})
.catch(e => {
this.formobj = {}
this.list = []
})
},
}

2
yxt-as-ui/src/views/storage/oldPartsRecovery/repairbillInfo.vue

@ -463,7 +463,7 @@
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(row.sid).then((res) => {
req.fetchBySid(row.billSid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.sitemVos.length > 0) {

Loading…
Cancel
Save