rev:修改区域选择

This commit is contained in:
2023-04-14 14:35:22 +08:00
parent d841b8e6c3
commit 82334dccf0
3 changed files with 335 additions and 219 deletions

View File

@@ -8,21 +8,22 @@
@close="close" @close="close"
@open="open" @open="open"
> >
<span slot="title" class="dialog-footer"> <span slot="title" class="dialog-footer">
<div class="crud-opts2"> <div class="crud-opts2">
<span class="el-dialog__title2">入库分配</span> <span class="el-dialog__title2">入库分配</span>
<span class="crud-opts-right2"> <span class="crud-opts-right2">
<!--左侧插槽--> <!--左侧插槽-->
<slot name="left"/> <slot name="left" />
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button> <el-button slot="left" type="info" @click="dialogVisible = false"
>关闭</el-button
>
</span> </span>
</div> </div>
</span> </span>
<div class="crud-opts2"> <div class="crud-opts2">
<span class="role-span">入库明细项</span> <span class="role-span">入库明细项</span>
</div> </div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}"> <el-card class="box-card" shadow="never" :body-style="{ padding: '0' }">
<!--表格渲染--> <!--表格渲染-->
<el-table <el-table
ref="dtl_table" ref="dtl_table"
@@ -32,10 +33,15 @@
border border
highlight-current-row highlight-current-row
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}" :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
@row-click="clcikRow" @row-click="clcikRow"
> >
<el-table-column prop="bill_status" label="状态" align="center" width="110px"> <el-table-column
prop="bill_status"
label="状态"
align="center"
width="110px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-select <el-select
v-model="scope.row.bill_status" v-model="scope.row.bill_status"
@@ -51,17 +57,57 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" /> <el-table-column
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" /> show-overflow-tooltip
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" /> prop="material_code"
<el-table-column show-overflow-tooltip prop="pcsn" label="订单号" align="center" /> label="物料编码"
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" /> align="center"
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" /> />
<el-table-column
show-overflow-tooltip
prop="material_name"
label="物料名称"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="material_spec"
label="物料规格"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="pcsn"
label="订单号"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="plan_qty"
:formatter="crud.formatNum3"
label="数量"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="qty_unit_name"
label="单位"
align="center"
/>
</el-table> </el-table>
</el-card> </el-card>
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}"> <el-card
<el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini"> class="box-card"
shadow="never"
:body-style="{ padding: '20px 20px 0 20px' }"
>
<el-form
ref="form2"
:inline="true"
:model="form"
:rules="rules"
size="mini"
>
<el-form-item label="入库点" prop="point_code"> <el-form-item label="入库点" prop="point_code">
<el-select <el-select
v-model="form.point_code" v-model="form.point_code"
@@ -78,55 +124,30 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<div class="crud-opts2"> <div class="crud-opts2">
<span class="role-span">载具物料明细</span> <span class="role-span">载具物料明细</span>
<div class="crud-opts-form"> <div class="crud-opts-form">
<el-form ref="form" :inline="true" :model="form" size="mini"> <el-form ref="form" :inline="true" :model="form" size="mini">
<el-form-item label="区域" prop="gender5">
<el-cascader
placeholder="请选择"
:options="sects"
:props="{ checkStrictly: true }"
<el-form-item label="区域" prop="sect_id"> clearable
<el-select @change="sectQueryChange"
v-model="form.sect_id"
clearable
placeholder="请选择"
class="filter-item"
style="width: 200px;"
>
<el-option
v-for="item in sects"
:key="item.sect_code"
:label="item.sect_name"
:value="item.sect_code"
/> />
</el-select> </el-form-item>
</el-form-item>
<el-form-item prop="checked"> <el-form-item prop="checked">
<el-checkbox v-model="form.checked">自动分配货位</el-checkbox> <el-checkbox v-model="form.checked">自动分配货位</el-checkbox>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<span class="crud-opts-right2"> <span class="crud-opts-right2">
<!--左侧插槽--> <!--左侧插槽-->
<slot name="left"/> <slot name="left" />
<el-button <el-button
slot="left" slot="left"
class="filter-item" class="filter-item"
@@ -170,7 +191,7 @@
</el-button> </el-button>
</span> </span>
</div> </div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}"> <el-card class="box-card" shadow="never" :body-style="{ padding: '0' }">
<!--表格渲染--> <!--表格渲染-->
<el-table <el-table
ref="dis_table" ref="dis_table"
@@ -178,16 +199,52 @@
style="width: 100%;" style="width: 100%;"
max-height="300" max-height="300"
border border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}" :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
@row-click="clcikRowDis" @row-click="clcikRowDis"
> >
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" /> <el-table-column
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" /> show-overflow-tooltip
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" /> type="index"
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" /> label="序号"
<el-table-column show-overflow-tooltip prop="pcsn" label="订单号" align="center" /> align="center"
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" /> />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" align="center"> <el-table-column
show-overflow-tooltip
prop="material_code"
label="物料编码"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="material_name"
label="物料名称"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="material_spec"
label="物料规格"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="pcsn"
label="订单号"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="plan_qty"
:formatter="crud.formatNum3"
label="数量"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="storagevehicle_code"
label="载具号"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="form.tableMater[scope.$index].storagevehicle_code" v-model="form.tableMater[scope.$index].storagevehicle_code"
@@ -198,27 +255,43 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" /> <el-table-column
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" /> show-overflow-tooltip
prop="point_code"
label="入库点"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="struct_code"
label="货位"
align="center"
/>
</el-table> </el-table>
</el-card> </el-card>
<StructDiv ref="child" :stor-id="storId" :dialog-show.sync="structShow" :sect-prop="sectProp" @tableChanged="tableChanged"/> <StructDiv
ref="child"
:stor-id="storId"
:dialog-show.sync="structShow"
:sect-prop="sectProp"
@tableChanged="tableChanged"
/>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import CRUD, { crud } from '@crud/crud' import CRUD, { crud } from "@crud/crud";
import StructDiv from '@/views/wms/pub/StructDialog' import StructDiv from "@/views/wms/pub/StructDialog";
import crudSemiProductIn from '@/api/wms/st/in/semiProductIn' import crudSemiProductIn from "@/api/wms/st/in/semiProductIn";
import crudPoint from '@/api/wms/sch/point' import crudPoint from "@/api/wms/sch/point";
import crudRegion from '@/api/wms/sch/region' import crudRegion from "@/api/wms/sch/region";
export default { export default {
name: 'DivDialog', name: "DivDialog",
components: { StructDiv }, components: { StructDiv },
mixins: [crud()], mixins: [crud()],
dicts: ['IO_BILL_STATUS'], dicts: ["IO_BILL_STATUS"],
props: { props: {
dialogShow: { dialogShow: {
type: Boolean, type: Boolean,
@@ -230,7 +303,7 @@ export default {
openParam: { openParam: {
type: Array, type: Array,
default: () => { default: () => {
return [] return [];
} }
}, },
billType: { billType: {
@@ -245,8 +318,8 @@ export default {
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
stor_id: '', stor_id: "",
sect_id: '', sect_id: "",
sectProp: null, sectProp: null,
bucketProp: {}, bucketProp: {},
structShow: false, structShow: false,
@@ -258,9 +331,9 @@ export default {
dis_row: null, dis_row: null,
form: { form: {
dtl_row: null, dtl_row: null,
storage_qty: '', storage_qty: "",
sect_id: '', sect_id: "",
stor_id: '', stor_id: "",
point_code: null, point_code: null,
checked: true, checked: true,
tableMater: [] tableMater: []
@@ -268,242 +341,285 @@ export default {
storlist: [], storlist: [],
pointlist: [], pointlist: [],
rules: {} rules: {}
} };
}, },
watch: { watch: {
dialogShow: { dialogShow: {
handler(newValue, oldValue) { handler(newValue, oldValue) {
this.dialogVisible = newValue this.dialogVisible = newValue;
} }
} }
}, },
methods: { methods: {
open() { open() {
crudRegion.getRegionSelect({ 'stor_id': '' }).then(res => { crudRegion.getRegionSelect({ stor_id: this.storId }).then(res => {
this.sects = res.content this.sects = res.content;
}) });
const area_type = 'A1_RK01' const area_type = "A1_RK01";
crudPoint.getPoint({ 'area_type': area_type }).then(res => { crudPoint.getPoint({ area_type: area_type }).then(res => {
this.pointlist = res this.pointlist = res;
}) });
}, },
toDelete(data) { toDelete(data) {
data.pop = true data.pop = true;
}, },
close() { close() {
this.form.tableMater = [] this.form.tableMater = [];
this.form.dtl_row = null this.form.dtl_row = null;
this.sectProp = null this.sectProp = null;
this.$emit('update:dialogShow', false) this.$emit("update:dialogShow", false);
this.$emit('AddChanged') this.$emit("AddChanged");
this.crud.refresh() this.crud.refresh();
this.$refs['form2'].resetFields() this.$refs["form2"].resetFields();
}, },
clcikRow(row, column, event) { clcikRow(row, column, event) {
this.form.dtl_row = row this.form.dtl_row = row;
crudSemiProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => { crudSemiProductIn
this.openParam = res .getIODtl({ iostorinv_id: this.form.dtl_row.iostorinv_id })
this.form.dtl_row = res[row.index] .then(res => {
}) this.openParam = res;
this.form.dtl_row = res[row.index];
});
crudSemiProductIn.getDisDtl(row).then(res => { crudSemiProductIn.getDisDtl(row).then(res => {
this.form.tableMater = res this.form.tableMater = res;
}) });
}, },
clcikRowDis(row, column, event) { clcikRowDis(row, column, event) {
this.dis_row = row this.dis_row = row;
}, },
vehicleCheck() { vehicleCheck() {
if (!this.form.dtl_row) { if (!this.form.dtl_row) {
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("请选择一条入库明细", CRUD.NOTIFICATION_TYPE.INFO);
this.form.storagevehicle_code = '' this.form.storagevehicle_code = "";
return return;
} }
crudSemiProductIn.checkVehicle({ crudSemiProductIn
'storagevehicle_code': this.form.storagevehicle_code, .checkVehicle({
'dis_num': this.form.tableMater.length, storagevehicle_code: this.form.storagevehicle_code,
'iostorinv_id': this.form.dtl_row.iostorinv_id dis_num: this.form.tableMater.length,
}).then(res => { iostorinv_id: this.form.dtl_row.iostorinv_id
})
}).catch(err => { .then(res => {})
this.form.storagevehicle_code = '' .catch(err => {
}) this.form.storagevehicle_code = "";
});
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
row.index = rowIndex row.index = rowIndex;
}, },
insertvehicle() { insertvehicle() {
if (!this.form.dtl_row) { if (!this.form.dtl_row) {
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("请选择一条入库明细", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
if (!this.form.storagevehicle_code) { if (!this.form.storagevehicle_code) {
this.crud.notify('请输入托盘号', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("请输入托盘号", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
// 判断是否选择了桶号 // 判断是否选择了桶号
if (this.bucketObj) { if (this.bucketObj) {
if (!(this.bucketObj.status === '01')) { if (!(this.bucketObj.status === "01")) {
this.crud.notify('请校验桶状态!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("请校验桶状态!", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
const dis_dtl = JSON.parse(JSON.stringify(this.bucketObj)) const dis_dtl = JSON.parse(JSON.stringify(this.bucketObj));
// 判断选择的桶是否已经被选过 // 判断选择的桶是否已经被选过
const flag = this.form.tableMater.some(mater => mater.bucketunique === dis_dtl.bucketunique) const flag = this.form.tableMater.some(
mater => mater.bucketunique === dis_dtl.bucketunique
);
if (!flag) { if (!flag) {
const flag = this.form.tableMater.some(mater => mater.storagevehicle_code !== this.form.storagevehicle_code) const flag = this.form.tableMater.some(
mater => mater.storagevehicle_code !== this.form.storagevehicle_code
);
if (flag) { if (flag) {
this.crud.notify('存在不同载具号', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("存在不同载具号", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
dis_dtl.storagevehicle_code = this.form.storagevehicle_code dis_dtl.storagevehicle_code = this.form.storagevehicle_code;
dis_dtl.pop = false dis_dtl.pop = false;
this.form.tableMater.splice(this.form.tableMater.length, 0, dis_dtl) this.form.tableMater.splice(this.form.tableMater.length, 0, dis_dtl);
if (this.form.dtl_row.assign_qty) { if (this.form.dtl_row.assign_qty) {
this.form.dtl_row.assign_qty = parseFloat(this.form.dtl_row.assign_qty) + parseFloat(this.form.storage_qty) this.form.dtl_row.assign_qty =
parseFloat(this.form.dtl_row.assign_qty) +
parseFloat(this.form.storage_qty);
} else { } else {
this.form.dtl_row.assign_qty = parseFloat(this.form.storage_qty) this.form.dtl_row.assign_qty = parseFloat(this.form.storage_qty);
} }
if (parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty) > 0) { if (
this.form.dtl_row.unassign_qty = parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty) parseFloat(this.form.dtl_row.unassign_qty) -
parseFloat(this.form.storage_qty) >
0
) {
this.form.dtl_row.unassign_qty =
parseFloat(this.form.dtl_row.unassign_qty) -
parseFloat(this.form.storage_qty);
} else { } else {
this.form.dtl_row.unassign_qty = 0 this.form.dtl_row.unassign_qty = 0;
} }
this.openParam.splice(this.form.dtl_row.index, 1, this.form.dtl_row) this.openParam.splice(this.form.dtl_row.index, 1, this.form.dtl_row);
} }
if (flag) { if (flag) {
this.crud.notify('该桶已被加入明细中', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("该桶已被加入明细中", CRUD.NOTIFICATION_TYPE.INFO);
} }
} else { } else {
this.crud.notify('请选择桶号', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("请选择桶号", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
}, },
confirmvehicle() { confirmvehicle() {
if (this.dis_row === null) { if (this.dis_row === null) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("请先选择一条分配明细!", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
if (this.dis_row.storagevehicle_code === '') { if (this.dis_row.storagevehicle_code === "") {
this.crud.notify('载具号不能为空', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("载具号不能为空", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
crudSemiProductIn.confirmvehicle(this.dis_row).then(res => { crudSemiProductIn.confirmvehicle(this.dis_row).then(res => {
crudSemiProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => { crudSemiProductIn
this.openParam = res .getIODtl({ iostorinv_id: this.form.dtl_row.iostorinv_id })
}) .then(res => {
this.openParam = res;
});
crudSemiProductIn.getDisDtl(this.form.dtl_row).then(res => { crudSemiProductIn.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res this.form.tableMater = res;
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify("组盘成功!", CRUD.NOTIFICATION_TYPE.SUCCESS);
}) });
}) });
}, },
sectQueryChange(val) { sectQueryChange(val) {
this.sectProp = val this.sectProp = val;
if (val.length === 1) { if (val.length === 1) {
this.stor_id = val[0] this.stor_id = val[0];
this.sect_id = '' this.sect_id = "";
} }
if (val.length === 0) { if (val.length === 0) {
this.sect_id = '' this.sect_id = "";
this.stor_id = '' this.stor_id = "";
} }
if (val.length === 2) { if (val.length === 2) {
this.stor_id = val[0] this.stor_id = val[0];
this.sect_id = val[1] this.sect_id = val[1];
} }
}, },
tableChanged(row) { tableChanged(row) {
this.sect_id =this.form.sect_id this.sect_id = this.form.sect_id;
this.form.stor_id = this.stor_id this.form.stor_id = this.stor_id;
// 新增一行物料时,给行进行赋值 // 新增一行物料时,给行进行赋值
for (let i = 0; i < this.form.tableMater.length; i++) { for (let i = 0; i < this.form.tableMater.length; i++) {
this.form.tableMater[i].struct_id = row.point_id this.form.tableMater[i].struct_id = row.point_id;
this.form.tableMater[i].struct_code = row.point_code this.form.tableMater[i].struct_code = row.point_code;
this.form.tableMater[i].struct_name = row.point_name this.form.tableMater[i].struct_name = row.point_name;
this.form.tableMater[i].region_code = row.region_code this.form.tableMater[i].region_code = row.region_code;
this.form.tableMater[i].region_name = row.region_name this.form.tableMater[i].region_name = row.region_name;
this.form.tableMater.splice(i, 1, this.form.tableMater[i]) // 通过splice 替换数据 触发视图更新 this.form.tableMater.splice(i, 1, this.form.tableMater[i]); // 通过splice 替换数据 触发视图更新
} }
crudSemiProductIn.divStruct(this.form).then(res => { crudSemiProductIn.divStruct(this.form).then(res => {
crudSemiProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => { crudSemiProductIn
this.openParam = res .getIODtl({
}) iostorinv_id: this.form.dtl_row.iostorinv_id,
this.form.tableMater = [] open_flag: "1"
}) })
.then(res => {
this.openParam = res;
});
this.form.tableMater = [];
});
}, },
divPoint() { divPoint() {
if (!this.form.point_code) { if (!this.form.point_code) {
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("请选择入库点", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
if (this.form.tableMater.length === 0) { if (this.form.tableMater.length === 0) {
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("请先选择一条明细!", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
crudSemiProductIn.divPoint(this.form).then(res => { crudSemiProductIn.divPoint(this.form).then(res => {
crudSemiProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => { crudSemiProductIn
this.openParam = res .getIODtl({
}) iostorinv_id: this.form.dtl_row.iostorinv_id,
open_flag: "1"
})
.then(res => {
this.openParam = res;
});
crudSemiProductIn.getDisDtl(this.form.dtl_row).then(res => { crudSemiProductIn.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res this.form.tableMater = res;
this.crud.notify('设置起点成功!', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify("设置起点成功!", CRUD.NOTIFICATION_TYPE.SUCCESS);
}) });
}) });
}, },
divStruct() { divStruct() {
if (this.dis_row === null) { if (this.dis_row === null) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("请先选择一条分配明细!", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
// 如果勾选了,直接跳后台 // 如果勾选了,直接跳后台
if (this.form.checked) { if (this.form.checked) {
if (!this.form.sect_id) { if (!this.sect_id) {
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
return return
} }
this.divBtn = true this.divBtn = true;
this.form.stor_id = this.stor_id this.form.stor_id = this.stor_id;
this.form.is_pc = '1' this.form.is_pc = "1";
crudSemiProductIn.divStruct(this.form).then(res => { crudSemiProductIn
crudSemiProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => { .divStruct(this.form)
this.openParam = res .then(res => {
crudSemiProductIn
.getIODtl({
iostorinv_id: this.form.dtl_row.iostorinv_id,
open_flag: "1"
})
.then(res => {
this.openParam = res;
});
crudSemiProductIn.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res;
this.divBtn = false;
this.crud.notify(
"分配货位成功!",
CRUD.NOTIFICATION_TYPE.SUCCESS
);
});
}) })
crudSemiProductIn.getDisDtl(this.form.dtl_row).then(res => { .finally(() => {
this.form.tableMater = res this.divBtn = false;
this.divBtn = false });
this.crud.notify('分配货位成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}).finally(() => {
this.divBtn = false
})
} else { } else {
this.structShow = true this.structShow = true;
this.$refs.child.getMsg(false) this.$refs.child.getMsg(false);
} }
}, },
unDivStruct() { unDivStruct() {
if (this.form.tableMater.length <= 0) { if (this.form.tableMater.length <= 0) {
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("不存在载具明细!", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
const flag = this.form.tableMater.some(mater => !mater.struct_code) const flag = this.form.tableMater.some(mater => !mater.struct_code);
if (flag) { if (flag) {
this.crud.notify('明细存在未分配货位!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify("明细存在未分配货位!", CRUD.NOTIFICATION_TYPE.INFO);
return return;
} }
// 如果勾选了,直接跳后台 // 如果勾选了,直接跳后台
crudSemiProductIn.unDivStruct(this.form).then(res => { crudSemiProductIn.unDivStruct(this.form).then(res => {
crudSemiProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => { crudSemiProductIn
this.openParam = res .getIODtl({
}) iostorinv_id: this.form.dtl_row.iostorinv_id,
open_flag: "1"
})
.then(res => {
this.openParam = res;
});
crudSemiProductIn.getDisDtl(this.form.dtl_row).then(res => { crudSemiProductIn.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res this.form.tableMater = res;
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify("取消分配成功!", CRUD.NOTIFICATION_TYPE.SUCCESS);
}) });
}) });
} }
} }
} };
</script> </script>
<style> <style>

View File

@@ -132,7 +132,7 @@
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号"> <el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.bill_code }}</el-link> <el-link type="warning" @click="toView(scope.row)">{{ scope.row.bill_code }}</el-link>
</template> </template>fileinput_name
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" /> <el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
<el-table-column prop="product_name" label="生产区域" width="130" show-overflow-tooltip /> <el-table-column prop="product_name" label="生产区域" width="130" show-overflow-tooltip />
@@ -145,8 +145,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="制单人" align="center" prop="input_name" /> <el-table-column label="制单人" align="center" prop="create_name" />
<el-table-column label="制单时间" align="center" prop="input_time" width="150" /> <el-table-column label="制单时间" align="center" prop="create_time" width="150" />
<el-table-column label="修改人" align="center" prop="update_name" /> <el-table-column label="修改人" align="center" prop="update_name" />
<el-table-column label="修改时间" align="center" prop="update_time" width="150" /> <el-table-column label="修改时间" align="center" prop="update_time" width="150" />
<el-table-column label="分配人" align="center" prop="dis_name" width="140px" /> <el-table-column label="分配人" align="center" prop="dis_name" width="140px" />

View File

@@ -150,8 +150,8 @@
<el-table-column show-overflow-tooltip label="明细数" align="center" prop="detail_count" width="60" /> <el-table-column show-overflow-tooltip label="明细数" align="center" prop="detail_count" width="60" />
<el-table-column show-overflow-tooltip label="总重量" align="center" prop="total_qty" width="100" /> <el-table-column show-overflow-tooltip label="总重量" align="center" prop="total_qty" width="100" />
<el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" /> <el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" />
<el-table-column show-overflow-tooltip label="制单人" align="center" prop="input_name" /> <el-table-column show-overflow-tooltip label="制单人" align="center" prop="create_name" />
<el-table-column show-overflow-tooltip label="制单时间" align="center" prop="input_time" width="140" /> <el-table-column show-overflow-tooltip label="制单时间" align="center" prop="create_time" width="140" />
<el-table-column show-overflow-tooltip label="修改人" align="center" prop="update_name" /> <el-table-column show-overflow-tooltip label="修改人" align="center" prop="update_name" />
<el-table-column show-overflow-tooltip label="修改时间" align="center" prop="update_time" width="140" /> <el-table-column show-overflow-tooltip label="修改时间" align="center" prop="update_time" width="140" />
<el-table-column show-overflow-tooltip label="分配人" align="center" prop="dis_name" /> <el-table-column show-overflow-tooltip label="分配人" align="center" prop="dis_name" />