|
|
|
@ -95,32 +95,32 @@ |
|
|
|
<el-tab-pane label="基本信息" name="first" style="height: 270px"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-dropdown trigger="click" style="margin-top: 3px" class="customer-dropdown" @command="handleCommand"> |
|
|
|
<el-button type="primary" :disabled="authEdit"> |
|
|
|
主菜单<i class="el-icon-arrow-down el-icon--right"></i> |
|
|
|
<el-dropdown trigger="click" style="margin-top: 3px" class="customer-dropdown" @command="handleCommand"> |
|
|
|
<el-button type="primary" :disabled="authEdit"> |
|
|
|
主菜单<i class="el-icon-arrow-down el-icon--right"></i> |
|
|
|
</el-button> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item class="customer-li" command="orderToScheduling"><span>查看派工单信息</span> |
|
|
|
</el-dropdown-item> |
|
|
|
<!-- <el-dropdown-item class="customer-li" command="changeRouting"><span>更改工艺路线版本</span>--> |
|
|
|
<!-- </el-dropdown-item>--> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
<el-button @click="updateModal" :disabled=authEdit type="primary" style="margin-left: 2px;margin-top: 0px"> |
|
|
|
编辑 |
|
|
|
</el-button> |
|
|
|
<el-button @click="deleteData" :disabled="authDelete" type="primary" style="margin-left: 2px;margin-top: 0px"> |
|
|
|
删除 |
|
|
|
</el-button> |
|
|
|
<el-button @click="warnCancelOrderConfirm()" :disabled="authEdit" type="primary" |
|
|
|
style="margin-left: 2px;margin-top: 0px">取消 |
|
|
|
</el-button> |
|
|
|
<el-button @click="warnCloseOrderConfirm()" :disabled="authEdit" type="primary" |
|
|
|
style="margin-left: 2px;margin-top: 0px">关闭 |
|
|
|
</el-button> |
|
|
|
<el-button @click="warnOpenOrderConfirm()" :disabled="authEdit" type="primary" |
|
|
|
style="margin-left: 2px;margin-top: 0px">打开 |
|
|
|
</el-button> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item class="customer-li" command="orderToScheduling"><span>查看派工单信息</span> |
|
|
|
</el-dropdown-item> |
|
|
|
<!-- <el-dropdown-item class="customer-li" command="changeRouting"><span>更改工艺路线版本</span>--> |
|
|
|
<!-- </el-dropdown-item>--> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
<el-button @click="updateModal" :disabled=authEdit type="primary" style="margin-left: 2px;margin-top: 0px"> |
|
|
|
编辑 |
|
|
|
</el-button> |
|
|
|
<el-button @click="deleteData" :disabled="authDelete" type="primary" style="margin-left: 2px;margin-top: 0px"> |
|
|
|
删除 |
|
|
|
</el-button> |
|
|
|
<el-button @click="warnCancelOrderConfirm()" :disabled="authEdit" type="primary" |
|
|
|
style="margin-left: 2px;margin-top: 0px">取消 |
|
|
|
</el-button> |
|
|
|
<el-button @click="warnCloseOrderConfirm()" :disabled="authEdit" type="primary" |
|
|
|
style="margin-left: 2px;margin-top: 0px">关闭 |
|
|
|
</el-button> |
|
|
|
<el-button @click="warnOpenOrderConfirm()" :disabled="authEdit" type="primary" |
|
|
|
style="margin-left: 2px;margin-top: 0px">打开 |
|
|
|
</el-button> |
|
|
|
</el-row> |
|
|
|
<div style="width:57%;float: left"> |
|
|
|
<el-row :gutter="5" style="margin-top: 10px"> |
|
|
|
@ -2988,12 +2988,13 @@ export default { |
|
|
|
/*执行取消工单的操作*/ |
|
|
|
cancelShopOrder() { |
|
|
|
//组合数据 |
|
|
|
this.modelData.userName = this.$store.state.user.name; |
|
|
|
cancelShopOrderBun(this.modelData).then(({data}) => { |
|
|
|
//判断是否成功 |
|
|
|
if (data.code == 200) { |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新工单的信息 |
|
|
|
this.tableHanddle(this.modelData); |
|
|
|
this.getData(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
@ -3012,29 +3013,20 @@ export default { |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
//执行重新打开sfdcRolls记录的操作 |
|
|
|
this.closeShopOrderBun(true); |
|
|
|
this.closeShopOrderBun(); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*执行取消工单的操作*/ |
|
|
|
closeShopOrderBun(checkFlag) { |
|
|
|
this.modelData.checkFlag = checkFlag; |
|
|
|
closeShopOrderBun() { |
|
|
|
this.modelData.userName = this.$store.state.user.name; |
|
|
|
//组合数据 |
|
|
|
closeShopOrder(this.modelData).then(({data}) => { |
|
|
|
//判断是否成功 |
|
|
|
if (data.code == 200) { |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新工单的信息 |
|
|
|
this.tableHanddle(this.modelData); |
|
|
|
} else if (data.code == 201) { |
|
|
|
this.$confirm(data.msg, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
celButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
//执行重新打开sfdcRolls记录的操作 |
|
|
|
this.closeShopOrderBun(false); |
|
|
|
}); |
|
|
|
this.getData(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
@ -3062,12 +3054,13 @@ export default { |
|
|
|
/*执行重新打开工单的操作*/ |
|
|
|
openShopOrderBun() { |
|
|
|
//组合数据 |
|
|
|
this.modelData.userName = this.$store.state.user.name; |
|
|
|
openShopOrder(this.modelData).then(({data}) => { |
|
|
|
//判断是否成功 |
|
|
|
if (data.code == 200) { |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新工单的信息 |
|
|
|
this.tableHanddle(this.modelData); |
|
|
|
this.getData(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
@ -3120,8 +3113,15 @@ export default { |
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
if (this.totalPage > 0) { |
|
|
|
//设置选中行 |
|
|
|
this.$refs.mainTable.setCurrentRow(this.dataList3[0]) |
|
|
|
this.tableHanddle(this.dataList3[0]) |
|
|
|
let selectedRow = this.dataList3[0]; |
|
|
|
if (this.modelData && this.modelData.orderNo) { |
|
|
|
const found = this.dataList3.find(item => item.orderNo === this.modelData.orderNo); |
|
|
|
if (found) { |
|
|
|
selectedRow = found; |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs.mainTable.setCurrentRow(selectedRow) |
|
|
|
this.tableHanddle(selectedRow) |
|
|
|
|
|
|
|
}else { |
|
|
|
this.tableHanddle(null) |
|
|
|
@ -3167,6 +3167,13 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
tableHanddle(row) { |
|
|
|
if (!row) { |
|
|
|
this.modelData = {}; |
|
|
|
this.dataList = []; |
|
|
|
this.dataList2 = []; |
|
|
|
this.dataList4 = []; |
|
|
|
return; |
|
|
|
} |
|
|
|
let data1 = { |
|
|
|
site: row.site, |
|
|
|
orderNo: row.orderNo, |
|
|
|
@ -3189,6 +3196,7 @@ export default { |
|
|
|
this.dataList4 = data.rows3; |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.modelData = {}; |
|
|
|
this.dataList = [] |
|
|
|
this.dataList2 = [] |
|
|
|
this.dataList4 = []; |
|
|
|
@ -3198,8 +3206,10 @@ export default { |
|
|
|
deleteData() { |
|
|
|
let inData = { |
|
|
|
site: this.modelData.site, |
|
|
|
buNo: this.modelData.buNo, |
|
|
|
orderNo: this.modelData.orderNo, |
|
|
|
status: this.modelData.status |
|
|
|
status: this.modelData.status, |
|
|
|
userName: this.$store.state.user.name |
|
|
|
} |
|
|
|
this.$confirm('确定删除生产订单吗?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
@ -3209,15 +3219,10 @@ export default { |
|
|
|
}).then(() => { |
|
|
|
deleteShopOrderData(inData).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.modelData = {}; |
|
|
|
this.$message.success('操作成功!') |
|
|
|
this.$message.success('操作成功!'); |
|
|
|
this.getData(); |
|
|
|
} else { |
|
|
|
// this.$alert(data.msg, '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|