quwangxin 2 lat temu
rodzic
commit
fe3497eae5

+ 36 - 15
src/views/produceOrder/components/report/Extrusion.vue

@@ -1,5 +1,9 @@
 <template>
 <template>
-  <el-form :model="{ categoryMsg, ...workReport }" ref="formRef">
+  <el-form
+    :model="{ categoryMsg, ...workReport }"
+    ref="formRef"
+    :show-message="false"
+  >
     <div class="message-box">
     <div class="message-box">
       <ul>
       <ul>
         <li> <span class="label">报工次数</span> {{ countMsg.reportNum }}</li>
         <li> <span class="label">报工次数</span> {{ countMsg.reportNum }}</li>
@@ -46,6 +50,7 @@
           <span class="label-required after" slot="label">原料编码/名称</span>
           <span class="label-required after" slot="label">原料编码/名称</span>
           <el-form-item
           <el-form-item
             label=""
             label=""
+            required
             label-width="0"
             label-width="0"
             class="w100"
             class="w100"
             prop="categoryMsg.packNum"
             prop="categoryMsg.packNum"
@@ -61,21 +66,37 @@
           categoryMsg.brandNum
           categoryMsg.brandNum
         }}</el-descriptions-item>
         }}</el-descriptions-item>
         <el-descriptions-item label="批次号">
         <el-descriptions-item label="批次号">
-          <el-select v-model="categoryMsg.batchNo" placeholder="请选择">
-            <el-option
-              v-for="(item, index) in batchList"
-              :key="index"
-              :label="item.batchNum"
-              :value="item.batchNum"
-              @click.native="categoryMsg.totalWeight = item.storageNum"
-            ></el-option>
-          </el-select>
+          <span class="label-required after" slot="label">批次号</span>
+          <el-form-item
+            label=""
+            required
+            label-width="0"
+            class="w100"
+            prop="categoryMsg.batchNo"
+          >
+            <el-select v-model="categoryMsg.batchNo" placeholder="请选择">
+              <el-option
+                v-for="(item, index) in batchList"
+                :key="index"
+                :label="item.batchNum"
+                :value="item.batchNum"
+                @click.native="categoryMsg.totalWeight = item.storageNum"
+              ></el-option>
+            </el-select>
+          </el-form-item>
         </el-descriptions-item>
         </el-descriptions-item>
-        <el-descriptions-item label="原料重量(KG)"
-          ><el-input
-            v-model="categoryMsg.totalWeight"
-            placeholder="请输入"
-          ></el-input
+        <el-descriptions-item label="原料重量(KG)">
+          <span class="label-required after" slot="label">原料重量(KG)</span>
+          <el-form-item
+            label=""
+            required
+            label-width="0"
+            class="w100"
+            prop="categoryMsg.totalWeight"
+            ><el-input
+              v-model="categoryMsg.totalWeight"
+              placeholder="请输入"
+            ></el-input> </el-form-item
         ></el-descriptions-item>
         ></el-descriptions-item>
         <el-descriptions-item label="质检项" :span="2">{{
         <el-descriptions-item label="质检项" :span="2">{{
           infoData.qualityItem
           infoData.qualityItem

+ 28 - 26
src/views/produceOrder/report.vue

@@ -194,32 +194,34 @@
     },
     },
     methods: {
     methods: {
       handleReport () {
       handleReport () {
-        this.$refs.reportRef.report(async (data) => {
-          // data.workReportCategoryList = data.workReportCategoryList || [
-          //   {
-          //     code: this.infoData.productCode,
-          //     name: this.infoData.productName,
-          //     rootCategoryLevelId: '1',
-          //     batchNo: '',
-          //     brandNum: this.infoData.brandNo
-          //   }
-          // ];
-          if (data.workReport) {
-            data.workReport.taskCode = this.tabList[this.activeName].code;
-            data.workReport.taskName = this.tabList[this.activeName].name;
-            data.workReport.taskSort = this.tabList[this.activeName].sortNum;
-            data.workReport.workOrderId = this.infoData.id;
-          }
+        this.$confirm('是否确定要报工?', '提示').then(() => {
+          this.$refs.reportRef.report(async (data) => {
+            // data.workReportCategoryList = data.workReportCategoryList || [
+            //   {
+            //     code: this.infoData.productCode,
+            //     name: this.infoData.productName,
+            //     rootCategoryLevelId: '1',
+            //     batchNo: '',
+            //     brandNum: this.infoData.brandNo
+            //   }
+            // ];
+            if (data.workReport) {
+              data.workReport.taskCode = this.tabList[this.activeName].code;
+              data.workReport.taskName = this.tabList[this.activeName].name;
+              data.workReport.taskSort = this.tabList[this.activeName].sortNum;
+              data.workReport.workOrderId = this.infoData.id;
+            }
 
 
-          const params = {
-            isSapReportState: 0,
-            lastTaskCode:
-              this.tabList[
-                this.activeName > 0 ? this.activeName - 1 : this.activeName
-              ].code,
-            ...data
-          };
-          await report(params);
+            const params = {
+              isSapReportState: 0,
+              lastTaskCode:
+                this.tabList[
+                  this.activeName > 0 ? this.activeName - 1 : this.activeName
+                ].code,
+              ...data
+            };
+            await report(params);
+          });
         });
         });
       },
       },
       async getDetail (id) {
       async getDetail (id) {
@@ -229,7 +231,7 @@
         // 获取工序
         // 获取工序
         const res1 = await getTaskListById(res.produceVersionId);
         const res1 = await getTaskListById(res.produceVersionId);
 
 
-        this.tabList = [...res1, { name: '自然干燥' }, { name: '升温干燥' }];
+        this.tabList = res1;
         this.activeName = '0';
         this.activeName = '0';
       }
       }
     }
     }

+ 2 - 2
vue.config.js

@@ -31,12 +31,12 @@ module.exports = {
     proxy: {
     proxy: {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
       '/api': {
-        // target: 'http://192.168.3.51:18086', // 测试
+        target: 'http://192.168.3.51:18086', // 测试
 
 
         // target: 'http://192.168.3.35:8080', // kang杨威
         // target: 'http://192.168.3.35:8080', // kang杨威
         // target: 'http://192.168.3.25:8080', // 黄峥嵘
         // target: 'http://192.168.3.25:8080', // 黄峥嵘
         // target: 'http://192.168.3.41:8080', // 何江鹏
         // target: 'http://192.168.3.41:8080', // 何江鹏
-        target: 'http://192.168.3.33:8080', // 谢一平
+        // target: 'http://192.168.3.33:8080', // 谢一平
 
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
         pathRewrite: {