退料入库
This commit is contained in:
parent
22b8403eaf
commit
816857a29d
|
|
@ -171,6 +171,7 @@
|
|||
placeholder="请选择入库来源"
|
||||
clearable filterable
|
||||
style="width: 220px"
|
||||
@change="changePutInType"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in codeInStoreOptions"
|
||||
|
|
@ -210,6 +211,19 @@
|
|||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="备注" label-width="130px" prop="remarks" v-if="isNumCheck">
|
||||
<el-input
|
||||
v-model="codeForm.remarks"
|
||||
type="textarea"
|
||||
placeholder="请输入备注"
|
||||
maxlength="200"
|
||||
rows="3"
|
||||
show-word-limit
|
||||
style="width: 13vw;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
|
|
@ -299,6 +313,42 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="7">
|
||||
<el-form-item label="领料单位" label-width="130px" prop="unitId" v-show="isPutInType">
|
||||
<el-select v-model="codeForm.unitId" placeholder="请选择领料单位" style="width: 220px;"
|
||||
@change="changeUnitData" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in unitList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="领料工程" label-width="130px" prop="proId" v-show="isPutInType">
|
||||
<el-select v-model="codeForm.proId" placeholder="请选择领料工程" style="width: 400px;"
|
||||
@change="changeProList" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in proList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label=" " label-width="130px" v-show="isPutInType">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="fillCodeForm">点击填充</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="7">
|
||||
<el-form-item label="检验人" label-width="130px" prop="checkMan" v-if="!isNumCheck">
|
||||
|
|
@ -306,8 +356,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="isNumCheck ? 7 : 10">
|
||||
<el-form-item label="备注" label-width="130px" prop="remarks">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="备注" label-width="130px" prop="remarks" v-if="!isNumCheck">
|
||||
<el-input
|
||||
v-model="codeForm.remarks"
|
||||
type="textarea"
|
||||
|
|
@ -315,14 +365,14 @@
|
|||
maxlength="200"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
:style="{ width: isNumCheck ? '220px' : '400px' }"
|
||||
style="width: 400px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="7">
|
||||
<el-form-item style="margin-left: 200px;">
|
||||
<el-form-item label=" " label-width="130px" v-show="!isPutInType">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="fillCodeForm">点击填充</el-button>
|
||||
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -512,6 +562,7 @@ import {
|
|||
} from "@/api/store/putInStore";
|
||||
import { getInfo } from '@/api/login'
|
||||
import { supplierInfoList } from "@/api/store/tools";
|
||||
import { getUnitData, getProData } from "@/api/claimAndRefund/receive";
|
||||
|
||||
export default {
|
||||
name: "DevicesWarehousing",
|
||||
|
|
@ -590,6 +641,11 @@ export default {
|
|||
remark: '', //单条备注
|
||||
preNum: 1, //预领数量
|
||||
},
|
||||
// 领料单位
|
||||
unitList: [],
|
||||
// 领料工程
|
||||
proList: [],
|
||||
isPutInType: false,
|
||||
// 表单参数:编号表单 / 数量表单
|
||||
numberForm: {},
|
||||
codeForm: {
|
||||
|
|
@ -605,6 +661,8 @@ export default {
|
|||
codeFactory: undefined,
|
||||
thisCheckTime: undefined,
|
||||
nextCheckTime: undefined,
|
||||
unitId: null,
|
||||
proId: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
|
@ -627,6 +685,12 @@ export default {
|
|||
num: [
|
||||
{ required: true, message: "待入库总数不能为空", trigger: "blur" }
|
||||
],
|
||||
unitId: [
|
||||
{ required: true, message: "领料单位不能为空", trigger: "change" }
|
||||
],
|
||||
proId: [
|
||||
{ required: true, message: "领料工程不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
|
|
@ -808,10 +872,12 @@ export default {
|
|||
/** 新增数量盘点按钮操作 */
|
||||
handleNumberAdd() {
|
||||
this.isNumCheck = true;
|
||||
this.isPutInType = false;
|
||||
this.reset();
|
||||
this.codeOpen = true;
|
||||
this.title = "数量盘点入库";
|
||||
this.resetCodeForm()
|
||||
this.getUnitData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['codeForm'].clearValidate()
|
||||
})
|
||||
|
|
@ -819,10 +885,12 @@ export default {
|
|||
/** 新增编号盘点按钮操作 */
|
||||
handleCodeAdd() {
|
||||
this.isNumCheck = false;
|
||||
this.isPutInType = false;
|
||||
this.reset();
|
||||
this.codeOpen = true;
|
||||
this.title = "编码盘点入库";
|
||||
this.resetCodeForm()
|
||||
this.getUnitData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['codeForm'].clearValidate()
|
||||
})
|
||||
|
|
@ -858,6 +926,8 @@ export default {
|
|||
putInType: this.codeForm.putInType,
|
||||
remarks: this.codeForm.remarks || '',
|
||||
machIneDtoList: this.numTableList,
|
||||
unitId: this.codeForm.unitId,
|
||||
proId: this.codeForm.proId,
|
||||
}
|
||||
console.log('🚀 ~ submitForm: ~ SavePutInfoDto-isNum', SavePutInfoDto)
|
||||
// 发送请求
|
||||
|
|
@ -892,6 +962,8 @@ export default {
|
|||
remarks: this.codeForm.remarks || '',
|
||||
machIneDtoList: this.codeTableList,
|
||||
checkMan: this.codeForm.checkMan || '',
|
||||
unitId: this.codeForm.unitId,
|
||||
proId: this.codeForm.proId,
|
||||
}
|
||||
console.log('🚀 ~ submitForm: ~ SavePutInfoDto', SavePutInfoDto)
|
||||
|
||||
|
|
@ -1032,7 +1104,54 @@ export default {
|
|||
}
|
||||
);
|
||||
},
|
||||
changePutInType(val) {
|
||||
if (val == '退料入库') {
|
||||
this.isPutInType = true
|
||||
} else {
|
||||
this.isPutInType = false
|
||||
}
|
||||
},
|
||||
// 领料单位
|
||||
async getUnitData() {
|
||||
try {
|
||||
const res = await getUnitData()
|
||||
this.unitList = res.data
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getUnitData ~ error:', error)
|
||||
}
|
||||
},
|
||||
changeUnitData(val) {
|
||||
// console.log('🚀 ~ changeUnitData ~ val:', val);
|
||||
this.codeForm.unitId = val
|
||||
this.proList = []
|
||||
this.$set(this.codeForm, 'proId', null)
|
||||
if(val) {
|
||||
this.getProList()
|
||||
}
|
||||
},
|
||||
async getProList() {
|
||||
const unitId = this.codeForm.unitId
|
||||
// 领料工程
|
||||
try {
|
||||
const res = await getProData({id: unitId})
|
||||
// console.log('🚀 ~ changeUnitData ~ data:', res.data);
|
||||
this.proList = res.data
|
||||
if (res.data.length == 0) {
|
||||
this.proList = []
|
||||
this.codeForm.proId = null
|
||||
} else {
|
||||
this.proList = res.data
|
||||
}
|
||||
// console.log('🚀 ~ changeUnitData ~ this.proList:', this.proList);
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ changeUnitData ~ error:', error)
|
||||
}
|
||||
},
|
||||
changeProList(val) {
|
||||
this.codeForm.proId = val
|
||||
// console.log('🚀 ~ changeProList ~ this.codeForm:', this.codeForm.proId);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Reference in New Issue