报工界面调整+计划页面调整

yangwl
zhaoxiaolin 8 months ago
parent 6adaac7446
commit 718990b50d

@ -79,6 +79,14 @@ export function subSplitOrder(data) {
}) })
} }
// 提交拆分
export function checkRepeatBatchCodes(data) {
return request({
url: '/plan/order/checkRepeatBatchCodes',
method: 'post',
data: data
})
}
// 获取换算值 // 获取换算值
export function getConvert() { export function getConvert() {

@ -525,6 +525,7 @@
:formatter="productCodeFormate" :formatter="productCodeFormate"
/> />
<el-table-column label="物料名称" width="280" align="left" prop="materialName" :show-overflow-tooltip="true" /> <el-table-column label="物料名称" width="280" align="left" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="BOM组件用量" width="150" align="left" prop="planQuantity"/>
<el-table-column label="实际用量" width="150" align="left" prop="quantity" :show-overflow-tooltip="true" > <el-table-column label="实际用量" width="150" align="left" prop="quantity" :show-overflow-tooltip="true" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input> <el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input>
@ -532,7 +533,7 @@
</el-table-column> </el-table-column>
<el-table-column label="单位" width="50" align="center" prop="unit"/> <el-table-column label="单位" width="50" align="center" prop="unit"/>
<el-table-column label="反冲标识" align="center" prop="recoil"/> <el-table-column label="反冲标识" align="center" prop="recoil"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="150"/>
<el-table-column label="仓库" width="150" align="center" prop="warehouseCode"> <el-table-column label="仓库" width="150" align="center" prop="warehouseCode">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.warehouseCode" placeholder="请选择仓库" width="50%" <el-select v-model="scope.row.warehouseCode" placeholder="请选择仓库" width="50%"
@ -548,6 +549,7 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="150"/>
<el-table-column fixed="right" label="操作" width="90"> <el-table-column fixed="right" label="操作" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click.native.prevent="deleteBomRow(scope.$index, item.libList)" <el-button @click.native.prevent="deleteBomRow(scope.$index, item.libList)"

@ -565,7 +565,7 @@ import {
getProRoutes,getProSortNo, getProRoutes,getProSortNo,
getProShifts, getProShifts,
getWorkOrderList, getWorkOrderList,
subSplitOrder, subSplitOrder,checkRepeatBatchCodes,
listOrder, listOrder,
addOrder, addOrder,
updateOrder, updateOrder,
@ -635,6 +635,8 @@ export default {
splitData: [], splitData: [],
//线list //线list
proline: [], proline: [],
//
single: true,
// //
splitnum: null, splitnum: null,
// //
@ -940,7 +942,8 @@ export default {
// //
getProRoutes(row.prodCode).then(response => { getProRoutes(row.prodCode).then(response => {
this.routes = response.data this.routes = response.data
this.splitForm.routeCode = response.data[0] this.splitForm.routeCode = response.data[0].routeCode
this.changeRoute(this.splitForm.routeCode)
}) })
var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD') var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD')
@ -1166,6 +1169,31 @@ export default {
}, },
// - // -
batchBtn() { batchBtn() {
this.loading = true;
let _this = this;
//
var repeatBatchCodes = "";
checkRepeatBatchCodes({formFields: this.formFields}).then(response => {
if(response != ""){
this.$modal.confirm('出现重复使用的批次号'+response+',是否继续进行拆分?').then(function () {
_this.batchBtnFunc();
}).then(() => {
_this.getList()
_this.loading = false;
}).catch(
function (e) {
if (e == 'cancel') {
_this.loading = false;
} else if(e == 'close') {
_this.loading = false;
}
})
}
});
},
batchBtnFunc(){
this.loading = true; this.loading = true;
// //
if (this.splitForm.splitNum == null) { if (this.splitForm.splitNum == null) {
@ -1268,8 +1296,10 @@ export default {
if (response.code == 500) { if (response.code == 500) {
this.$modal.msgError(response.msg) this.$modal.msgError(response.msg)
return return
}else{
this.$modal.msgSuccess('提交成功')
} }
this.$modal.msgSuccess('提交成功')
this.queryParams.status = "o1" this.queryParams.status = "o1"
this.loading = false; this.loading = false;
this.getList() this.getList()
@ -1295,6 +1325,7 @@ export default {
this.loading = false; this.loading = false;
}, },
// -- // --
cancel() { cancel() {
this.dialogVisible = false; this.dialogVisible = false;
@ -1403,7 +1434,7 @@ export default {
/**自动排产**/ /**自动排产**/
// //
handleAutoSplitSelection(selection) { handleAutoSplitSelection(selection) {
this.single = selection.length !== 1
this.orderCodes = selection this.orderCodes = selection
}, },
// //
@ -1431,7 +1462,6 @@ export default {
this.$modal.confirm('是否确认关闭订单"' + orderCodes + '"').then(function () { this.$modal.confirm('是否确认关闭订单"' + orderCodes + '"').then(function () {
return deleteOrder(orderIds); return deleteOrder(orderIds);
}).then(() => { }).then(() => {
this.$modal.msgSuccess("关闭成功");
this.loading = false; this.loading = false;
this.getList(); this.getList();
}).catch( }).catch(

Loading…
Cancel
Save