diff --git a/src/api/plan/workorder.js b/src/api/plan/workorder.js
index 750f3c29..433b5b7c 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 9be291bd..ae4eab2b 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 39135637..8a80e775 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 f5fcde2f..ec1cf897 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
+
+