refactor(入库计划): 同步小型刀具库 更改为按钮触发
This commit is contained in:
parent
4d5c3ea548
commit
e273d0636a
@ -51,3 +51,11 @@ export function isDuplicatePlanCode(planCode) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 同步小型刀具库 入库数据
|
||||||
|
export function syncInBound() {
|
||||||
|
return request({
|
||||||
|
url: '/wm/PLAN/sync',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -58,6 +58,16 @@
|
|||||||
>拆刀回库
|
>拆刀回库
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="handleSync"
|
||||||
|
>同步小型刀具库
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -137,9 +147,9 @@
|
|||||||
<el-dialog :title="dialogTitle" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false">
|
<el-dialog :title="dialogTitle" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false">
|
||||||
<!--状态为 1 已执行 则禁用表单-->
|
<!--状态为 1 已执行 则禁用表单-->
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" inline :disabled="form.state === '1'">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" inline :disabled="form.state === '1'">
|
||||||
<el-form-item label="计划编码" prop="planCode">
|
<!-- <el-form-item label="计划编码" prop="planCode">-->
|
||||||
<el-input v-model="form.planCode" placeholder="请输入计划编码"></el-input>
|
<!-- <el-input v-model="form.planCode" placeholder="请输入计划编码"></el-input>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="源头单据" prop="relBillCode">
|
<el-form-item label="源头单据" prop="relBillCode">
|
||||||
<el-input v-model="form.relBillCode" placeholder="请输入源头单据"></el-input>
|
<el-input v-model="form.relBillCode" placeholder="请输入源头单据"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -235,7 +245,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listPLAN, getPLAN, delPLAN, addPLAN, updatePLAN, isDuplicatePlanCode,} from "@/api/wm/PLAN";
|
import {listPLAN, getPLAN, delPLAN, addPLAN, updatePLAN, isDuplicatePlanCode, syncInBound,} from "@/api/wm/PLAN";
|
||||||
import {listTYPE} from "@/api/md/TYPE";
|
import {listTYPE} from "@/api/md/TYPE";
|
||||||
import {listMdItem} from "@/api/mes/md/mdItem"
|
import {listMdItem} from "@/api/mes/md/mdItem"
|
||||||
import {listArea} from "@/api/mes/wm/area"
|
import {listArea} from "@/api/mes/wm/area"
|
||||||
@ -354,8 +364,6 @@ export default {
|
|||||||
this.PLANList = response.rows;
|
this.PLANList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.getPlanTypeList();
|
this.getPlanTypeList();
|
||||||
this.getMdItemList();
|
|
||||||
this.getAreaList();
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -379,7 +387,6 @@ export default {
|
|||||||
* @param itemName
|
* @param itemName
|
||||||
*/
|
*/
|
||||||
getMdItemList(itemName = "") {
|
getMdItemList(itemName = "") {
|
||||||
this.loading = true;
|
|
||||||
const params = {
|
const params = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
@ -395,7 +402,6 @@ export default {
|
|||||||
* @param areaName
|
* @param areaName
|
||||||
*/
|
*/
|
||||||
getAreaList(areaName = "") {
|
getAreaList(areaName = "") {
|
||||||
this.loading = true;
|
|
||||||
const params = {
|
const params = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
@ -500,6 +506,12 @@ export default {
|
|||||||
this.single = selection.length !== 1
|
this.single = selection.length !== 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
|
handleSync() {
|
||||||
|
syncInBound().then(res => {
|
||||||
|
this.getList();
|
||||||
|
this.$message.success("数据同步成功");
|
||||||
|
})
|
||||||
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd(planTypeCode) {
|
handleAdd(planTypeCode) {
|
||||||
this.reset();
|
this.reset();
|
||||||
@ -519,6 +531,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.knifeBackVisible = true;
|
this.knifeBackVisible = true;
|
||||||
}
|
}
|
||||||
|
this.getMdItemList();
|
||||||
|
this.getAreaList();
|
||||||
this.dialogTitle = "新增" + filter[0].name;
|
this.dialogTitle = "新增" + filter[0].name;
|
||||||
},
|
},
|
||||||
/** 执行按钮操作 */
|
/** 执行按钮操作 */
|
||||||
|
Loading…
Reference in New Issue
Block a user