Jelajahi Sumber

Merge remote-tracking branch 'origin/qingban' into qingban

jxq 1 Minggu lalu
induk
melakukan
c067dfa948

+ 2 - 2
src/api/report/index.ts

@@ -42,9 +42,9 @@ export function getOperationInfo(data: string) {
 }
 
 // 获取工单编码
-export function getJobInfo(orderId: string, opType: string) {
+export function getJobInfo(orderId: string, opType: string,orderType: string) {
   return request({
-    url: `/api/v1/plan/workOrder/workOrderCode/${orderId}/${opType}`,
+    url: `/api/v1/plan/workOrder/workOrderCode/${orderId}/${opType}/${orderType}`,
     method: "get",
   });
 }

+ 2 - 2
src/views/base/craftManagement/route/bindProcess.vue

@@ -234,7 +234,7 @@
               </div>
             </div>
             <div v-else-if="!usableStatus" class="tipContent">
-              已绑定工序不可编辑线路情况
+              工艺路线已绑定或审核完成工序不可编辑
             </div>
             <div v-else class="tipContent">请选择工序</div>
           </div>
@@ -632,7 +632,7 @@ const loadProcessesFlow = async () => {
       flowData.edges = jsonData.edges;
       flowDataCopy.value = JSON.parse(JSON.stringify(jsonData));
       cancelStatus.value = true;
-      if (res.data.usable == 1) {
+      if (res.data.usable == 1||res.data.flowState==="1") {
         usableStatus.value = false;
       }
 

+ 1 - 1
src/views/plan/finishProduct/components/in-stock.vue

@@ -62,7 +62,7 @@ const crudRef = ref(null);
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
   useCrud({
-    src: "/api/v1/plan/seq",
+    src: "/api/v1/plan/seq/inStock",
   });
 const {
   dataNoPageList,

+ 26 - 1
src/views/plan/workOrder/index.vue

@@ -737,6 +737,14 @@ option.value = Object.assign(option.value, {
         label: "dictLabel",
         value: "dictValue",
       },
+      change: ({ value, column }) => {
+        if(form.value.opType&&form.value.workOrderCode&&form.value.orderCode){
+            // 只有新增的时候需要调用,编辑的时候可能只限编辑先工序
+            if (column.boxType && column.boxType === "add") {
+                getOrderType(value);
+            }
+        }
+      }
     },
     {
       label: "产品编号",
@@ -853,6 +861,17 @@ option.value = Object.assign(option.value, {
         label: "dictLabel",
         value: "dictValue",
       },
+      click: ({ value, column }) => {
+        if (column.boxType) {
+          if (!form.value.orderType) {
+            ElMessage({
+              message: "请先选择订单类型",
+              type: "warning",
+            });
+            return;
+          }
+        }
+      },
       change: ({ value, column }) => {
         option.value.column.forEach((item) => {
           if (value) {
@@ -1204,11 +1223,17 @@ onMounted(() => {
 
 // 选择完前工序或者后工序后获取这个
 const getOpGroup = (value) => {
-  getJobInfo(form.value.orderCode, value + "").then((res) => {
+  getJobInfo(form.value.orderCode, value + "",form.value.orderType).then((res) => {
     form.value.workOrderCode = res.data;
   });
 };
 
+const getOrderType = (value) => {
+    getJobInfo(form.value.orderCode, form.value.opType,value+"").then((res) => {
+        form.value.workOrderCode = res.data;
+    });
+};
+
 // 输入完最大值和最小值计算工单数量
 const countPlanNum = () => {
   if (form.value.seqMax && form.value.seqMin) {