From f4c6e61cffdcb74837f44dc566a19a3622e92057 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Wed, 2 Aug 2023 09:52:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86=E6=A8=A1?= =?UTF-8?q?=E5=9D=97(=E6=8B=86=E5=88=86=E6=95=B0=E9=87=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D)=E3=80=81=E6=B9=BF=E6=96=99?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=AE=A1=E7=90=86(=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=98=BE=E7=A4=BA)=E3=80=81=E5=B7=A5=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86(=E5=B7=A5=E5=8D=95=E4=BF=AE=E6=94=B9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=AE=8C=E6=88=90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/plan/workorder.js | 35 ++ src/views/plan/order/index.vue | 11 +- src/views/plan/plan/index.vue | 4 +- src/views/plan/workorder/index.vue | 636 ++++++++++++++++++++++++----- 4 files changed, 571 insertions(+), 115 deletions(-) diff --git a/src/api/plan/workorder.js b/src/api/plan/workorder.js index 750f3c2..433b5b7 100644 --- a/src/api/plan/workorder.js +++ b/src/api/plan/workorder.js @@ -1,5 +1,40 @@ import request from '@/utils/request' +// 校验工单是否可以修改 +export function checkWorkOrder(workorderId){ + return request({ + url:'/plan/pro/workorder/checkWorkOrder/'+workorderId, + method:'get' + }) +} + +// 提交修改工单接口 +export function subChangeWorkOrder(data){ + return request({ + url:'/plan/pro/workorder/subChangeWorkOrder', + method:'post', + data:data + }) +} + +// 通过子工单查询父工单对应的批次list +export function getWorkBatchList(data){ + return request({ + url:'/plan/pro/workorder/getWorkBatchList', + method:'post', + data: data + }) +} + +// 通过子工单查询订单信息和工单信息 +export function getOrderAndWork(data) { + return request({ + url: '/plan/pro/workorder/getOrderAndWorkInfo', + method: 'post', + data: data + }) +} + // 查询生产工单列表 export function listWorkorder(query) { return request({ diff --git a/src/views/plan/order/index.vue b/src/views/plan/order/index.vue index 9be291b..ae4eab2 100644 --- a/src/views/plan/order/index.vue +++ b/src/views/plan/order/index.vue @@ -78,7 +78,7 @@ icon="el-icon-plus" size="mini" @click="dialogVisible = true" - v-hasPermi="['order:order:add']" + v-hasPermi="['mes:pro:order:add']" >新增 @@ -163,7 +163,7 @@ type="text" icon="el-icon-plus" @click="splitBtn(scope.row)" - v-hasPermi="['mes:pro:order:add']" + v-hasPermi="['mes:pro:order:edit']" v-if="scope.row.parentOrder == 0" >拆分 @@ -179,7 +179,7 @@ - + @@ -570,11 +570,12 @@ export default { // 在获取到新的数据后执行以下代码 this.proLoading = true // 设置加载状态为true,表示正在加载 + var num = this.productData[0].quantity; // 递归操作动态显示拆分数量 function setAtrr1(data, splitNum) { if (data.children !== undefined) { for (let i = 0; i < data.children.length; i++) { - data.children[i].atrr1 = splitNum * (data.children[i].quantity / data.quantity) + data.children[i].atrr1 = splitNum * (data.children[i].quantity / num) setAtrr1(data.children[i], splitNum) } } @@ -609,7 +610,7 @@ export default { .catch(_ => { }) }, - /** 提交按钮 */ + /** 新增-提交按钮 */ submitForm() { // 表单校验 if (this.checkNull(this.form.prodCode) == 0 || this.checkNull(this.form.planProDate) == 0 || this.checkNull(this.form.prodDesc) == 0 || this.checkNull(this.form.planComplete) == 0 || this.checkNull(this.form.quantity) == 0 || this.checkNull(this.form.unit) == 0 || this.checkNull(this.form.prodType) == 0) { diff --git a/src/views/plan/plan/index.vue b/src/views/plan/plan/index.vue index 3913563..8a80e77 100644 --- a/src/views/plan/plan/index.vue +++ b/src/views/plan/plan/index.vue @@ -628,11 +628,11 @@ export default { // 转换日期格式 var productDate = moment(e).format('YYYY-MM-DD') + // 在获取到新的数据后执行以下代码 + this.workLoading = true // 设置加载状态为true,表示正在加载 getWorkOrderList(productDate).then(response => { this.workOrderList = response.data // 刷新表格 - // 在获取到新的数据后执行以下代码 - this.workLoading = true // 设置加载状态为true,表示正在加载 this.refreshWorkTable = false // 先将refreshProTable设置为false,隐藏表格 this.$nextTick(() => { // 使用$nextTick来等待DOM更新完成 diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index f5fcde2..ec1cf89 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -167,11 +167,11 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 删除 + + 添加 + + + + + + + + + + + + + + + + + + + \ No newline at end of file + +