瀏覽代碼

生产准备

qinhb 1 年之前
父節點
當前提交
a276c24699

+ 17 - 0
src/views/device/instance/index.vue

@@ -207,6 +207,7 @@ const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 option.value = Object.assign(option.value, {
   delBtn: false,
   selection: true,
+  labelWidth: 120,
   column: [
     {
       label: "设备编号",
@@ -308,6 +309,22 @@ option.value = Object.assign(option.value, {
       ],
     },
     {
+      label: "计量有效期",
+      prop: "meteringDate",
+      type: "date",
+      width: 160,
+      format: 'YYYY-MM-DD',
+      valueFormat: 'YYYY-MM-DD',
+      overHidden: true,
+      rules: [
+        {
+          required: true,
+          message: "计量有效期不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    {
       label: "所属PAC",
       prop: "terminal",
       type: "select",

+ 13 - 4
src/views/plan/order/index.vue

@@ -277,10 +277,19 @@ option.value = {
       rules: [
         {
           required: true,
-          message: "产品版本不能为空",
-          trigger: "trigger",
-        },
-      ],
+          message: "请输入小数点后只能有一位的数值",
+          trigger: "blur",
+          validator: (rule, value, callback) => {
+            if (!value) {
+              callback(new Error("输入不能为空"));
+            } else if (!/^\d+(\.\d{1})?$/.test(value)) {
+              callback(new Error("请输入小数点后只有一位的数值"));
+            } else {
+              callback();
+            }
+          }
+        }
+      ]
     },
     {
       label: "订单状态",

+ 32 - 21
src/views/plan/prepare/index.vue

@@ -25,6 +25,7 @@
             <el-progress
                 :text-inside="true"
                 :stroke-width="35"
+                :font-color="'#ff0000'"
                 :percentage="item.completeNum/row.workOrderNum * 100"
                 status="success"
             >{{item.operationName}}(完成{{item.completeNum}})
@@ -45,7 +46,7 @@
         <el-button
             type="primary"
             link
-            v-if="row.materialState === '0' || row.deviceState === '0'"
+            v-if="row.materialState === '-' || row.deviceState === '-' || row.bom === '-' || row.craftFile === '-'"
             size="small"
             @click="handleRefresh(row.workOrderCode)"
         ><i-ep-edit />刷新
@@ -88,6 +89,7 @@ import {prepareCheckInfo,refreshPrepareCheckInfo} from "@/api/order"
 import {queryChildrenInfo} from "@/api/process"
 import { useCommonStoreHook } from "@/store";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+const router = useRouter();
 const test = () => {
   isShowTable.value = true;
   tableType.value = tableType.value == 1 ? 2 : 1;
@@ -282,8 +284,8 @@ option.value = Object.assign(option.value, {
       ],
     },
     {
-      label: "工艺文件",
-      width: 115,
+      label: "文件资料",
+      width: 350,
       overHidden: true,
       prop: "craftFile",
       addDisplay: false,
@@ -291,10 +293,10 @@ option.value = Object.assign(option.value, {
       editDisplay: false,
       html: true,
       formatter: (val) => {
-        if (val.craftFile === '1') {
-          return '<b class="el-tag el-tag--success el-tag--light">已齐套</b>';
+        if (val.craftFile !== '-') {
+          return '<b class="el-tag el-tag--success el-tag--light">'+val.craftFile+'</b>';
         }
-        return '<b class="el-tag el-tag--danger el-tag--light">未齐套</b>';
+        return '<b class="el-tag el-tag--danger el-tag--light">-</b>';
       },
     },
     {
@@ -307,10 +309,10 @@ option.value = Object.assign(option.value, {
       editDisplay: false,
       html: true,
       formatter: (val) => {
-        if (val.bom === '1') {
-          return '<b class="el-tag el-tag--success el-tag--light">已齐套</b>';
+        if (val.bom !== '-') {
+          return '<b class="el-tag el-tag--success el-tag--light">'+val.bom+'</b>';
         }
-        return '<b class="el-tag el-tag--danger el-tag--light">未齐套</b>';
+        return '<b class="el-tag el-tag--danger el-tag--light">-</b>';
       },
     },
     {
@@ -323,13 +325,13 @@ option.value = Object.assign(option.value, {
       prop: "routeId",
       html: true,
       formatter: (val) => {
-        if (val.routeId === '1') {
-          return '<b class="el-tag el-tag--success el-tag--light">已齐套</b>';
+        if (val.routeId !== '-') {
+          return '<b class="el-tag el-tag--success el-tag--light">'+val.routeId+'</b>';
         }
-        return '<b class="el-tag el-tag--danger el-tag--light">未齐套</b>';
+        return '<b class="el-tag el-tag--danger el-tag--light">-</b>';
       },
     },
-    {
+    /*{
       label: "设计文件",
       prop: "dataFile",
       width: 115,
@@ -344,8 +346,8 @@ option.value = Object.assign(option.value, {
         }
         return '<b class="el-tag el-tag--danger el-tag--light">未齐套</b>';
       },
-    },
-    {
+    },*/
+   /* {
       label: "工艺文件",
       width: 115,
       overHidden: true,
@@ -374,8 +376,8 @@ option.value = Object.assign(option.value, {
       hide: true,
       prop: "routeIds",
       dicData: [ { label: "已齐套", value: "1", }, ],
-    },
-    {
+    },*/
+   /* {
       label: "设计文件",
       prop: "dataFiles",
       width: 150,
@@ -385,7 +387,7 @@ option.value = Object.assign(option.value, {
       multiple: true,
       hide: true,
       dicData: [ { label: "已齐套", value: "1", }, ],
-    },
+    },*/
     {
       label: "设备状况",
       prop: "deviceState",
@@ -459,11 +461,20 @@ option.value = Object.assign(option.value, {
 onMounted(() => {
   form.value.routeId = "1"
   form.value.materialState = 1
-  // console.log("crudRef", crudRef)
+  let url = window.location.href
+  if(url.includes("workOrderCode")){
+    search.value.workOrderCode = url.substring(url.indexOf("workOrderCode")+ 14)
+  }
   dataList();
 });
 
 </script>
-<style>
-
+<style scoped>
+:deep(.el-progress-bar__innerText) {
+  color: #737674;
+  display: inline-block;
+  font-size: 12px;
+  margin: 0 5px;
+  vertical-align: middle;
+}
 </style>

+ 4 - 0
src/views/plan/requisition/index.vue

@@ -581,6 +581,10 @@ option.value = Object.assign(option.value, {
 });
 
 onMounted(() => {
+  let url = window.location.href
+  if(url.includes("workOrderCode")){
+    search.value.workOrderCode = url.substring(url.indexOf("workOrderCode")+ 14)
+  }
   queryWorkOrderList({}).then((data)=>{
     if(!data.data){
       ElMessage.warning("请维护物料BOM")

+ 15 - 3
src/views/plan/workOrder/components/choice-route-page.vue

@@ -38,21 +38,32 @@ const props = defineProps({
     default: () => {
       return '';
     }
+  },
+  processRouteType: {
+    type: String,
+    default: () => {
+      return '';
+    }
   }
 })
 watch(
   () => props.materialCode,
   () => {
-    search.value.prodtCode = props.materialCode
-    search.value.enabled = "0"
+    search.value.materialCode = props.materialCode
     dataList();
   }
 );
 watch(
+    () => props.processRouteType,
+    () => {
+      search.value.processRouteType = props.processRouteType
+      dataList();
+    }
+);
+watch(
     () => props.materialVersion,
     () => {
       search.value.processRouteVersion = props.materialVersion
-      search.value.enabled = "0"
       dataList();
     }
 );
@@ -184,6 +195,7 @@ option.value = Object.assign(option.value, {
 onMounted(() => {
   search.value.processRouteVersion = props.materialVersion
   search.value.prodtCode = props.materialCode
+  search.value.processRouteType =  props.processRouteType
   search.value.enabled = "0"
   dataList();
 });

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

@@ -73,6 +73,18 @@
             @click="revoke(row.id)"
             type="primary"
             :size="size">撤销</el-button>
+        <el-button
+            icon="el-icon-setting"
+            text
+            @click="jumpPage(row.workOrderCode,1)"
+            type="primary"
+            :size="size">领用申请</el-button>
+        <el-button
+            icon="el-icon-setting"
+            text
+            @click="jumpPage(row.workOrderCode,2)"
+            type="primary"
+            :size="size">生产准备</el-button>
       </template>
     </avue-crud>
     <el-dialog
@@ -90,7 +102,7 @@
         width="80%"
         @close="dialog1.visible = false"
     >
-      <choice-route-page :material-version="materialVersion" :material-code="form.materialCode" @routeInfo="routeInfo"/>
+      <choice-route-page :material-version="materialVersion" :processRouteType="processRouteType" :material-code="form.materialCode" @routeInfo="routeInfo"/>
     </el-dialog>
 
     <el-dialog
@@ -180,10 +192,12 @@ import WorkOrderSeq from "./components/work-order-seq.vue";
 import { checkPerm } from "@/directive/permission";
 import {queryDictDataByType} from "@/api/system/dict"
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+const router = useRouter();
 const test = () => {
   isShowTable.value = true;
   tableType.value = tableType.value == 1 ? 2 : 1;
 };
+const processRouteType = ref('')
 const permission = reactive({
   delBtn: checkPerm(buttonPermission.PLAN.BTNS.work_order_del),
   addBtn: checkPerm(buttonPermission.PLAN.BTNS.work_order_add),
@@ -193,6 +207,14 @@ const permission = reactive({
 const disabledDate = (time) =>{
   return time.getTime() < Date.now(); // 8.64e7 毫秒数代表一天
 }
+
+const jumpPage= (workOrderCode,type) =>{
+  if(type === 1){
+    router.push('/requisition?workOrderCode=' + workOrderCode);
+  }else{
+    router.push('/plan/prepare?workOrderCode=' + workOrderCode);
+  }
+}
 const dialog = reactive({
   title: "订单选择",
   visible: false,
@@ -301,6 +323,7 @@ const orderInfo = (value) => {
   form.value.materialName = value.materialName
   form.value.materialModel = value.materialModel
   form.value.priority = value.priority
+  form.value.orderType = value.orderType
   materialVersion.value = value.materialVersion
   dialog.visible = false
 }
@@ -375,6 +398,19 @@ option.value = Object.assign(option.value, {
       overHidden: true,
     },
     {
+      label: "订单类型",
+      prop: "orderType",
+      type: "select", //类型为下拉选择框
+      width: 100,
+      disabled: true,
+      overHidden: true,
+      dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_type,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+    },
+    {
       label: "产品编号",
       width: 125,
       overHidden: true,
@@ -445,6 +481,7 @@ option.value = Object.assign(option.value, {
             })
             return;
           }
+          processRouteType.value = form.value.orderType === '1' ? "ZC" : "FG"
           dialog1.visible = true
         }
       },