695593266@qq.com před 8 měsíci
rodič
revize
ba3e2b266d

+ 12 - 4
src/views/saleOrder/index.vue

@@ -71,6 +71,13 @@
           {{ row.contractNum }} {{ row.measuringUnit }}
         </template>
 
+        <template v-slot:lackNum="{ row }">
+          <span v-if="row.lackNum"
+            >{{ row.lackNum }} {{ row.measuringUnit }}</span
+          >
+          <span v-else>无</span>
+        </template>
+
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <template>
@@ -203,7 +210,7 @@
             width: 45,
             type: 'selection',
             columnKey: 'selection',
-            align: 'center',
+            align: 'center'
             // selectable: (row, index) => {
             //   return this.activeName != 'second';
             // }
@@ -298,7 +305,7 @@
             label: '机型',
             align: 'center',
             minWidth: 120,
-            showOverflowTooltip: true,
+            showOverflowTooltip: true
             // formatter: (row) => {
             //   if (row.modelKey) {
             //     return row.modelKey.toString();
@@ -311,7 +318,7 @@
             label: '颜色',
             align: 'center',
             minWidth: 120,
-            showOverflowTooltip: true,
+            showOverflowTooltip: true
             // formatter: (row) => {
             //   if (row.colorKey) {
             //     return row.colorKey.toString();
@@ -377,10 +384,11 @@
           },
           {
             prop: 'lackNum',
+            slot: 'lackNum',
             label: '欠交数量',
             align: 'center'
           },
-                 {
+          {
             prop: 'measuringUnit',
             label: '计量单位',
             align: 'center'

+ 4 - 4
src/views/saleOrder/salesToProductionNewTwo.vue

@@ -261,9 +261,9 @@
             }}</el-form-item>
           </el-col>
           <el-col v-bind="styleResponsive ? { lg: 3, md: 12 } : { span: 3 }">
-            <el-form-item label-width="88px" label="订单总数量:">{{
-              form.contractNum
-            }}</el-form-item>
+            <el-form-item label-width="88px" label="订单总数量:"
+              >{{ form.contractNum }}{{ form.measuringUnit }}</el-form-item
+            >
           </el-col>
           <el-col v-bind="styleResponsive ? { lg: 3, md: 12 } : { span: 4 }">
             <el-form-item label-width="88px" label="订单总重量:">{{
@@ -339,7 +339,7 @@
           >
             <template slot-scope="scope">
               {{ scope.row.contractNum }}
-              <!-- {{ scope.row.measuringUnit }} -->
+              {{ scope.row.measuringUnit }}
             </template>
           </el-table-column>
           <el-table-column

+ 22 - 3
src/views/workOrder/components/batchDialog.vue

@@ -166,6 +166,8 @@
     listWorkCenter
   } from '@/api/mainData/index.js';
 
+  import { parameterGetByCode } from '@/api/mainData/index';
+
   export default {
     data() {
       return {
@@ -248,7 +250,7 @@
           factoryName: '',
           factoryLineIds: ''
         };
-        this.workCenterList =  [];
+        this.workCenterList = [];
         this.teamList = [];
         this.crewList = [];
         this.stationList = [];
@@ -261,7 +263,8 @@
         this.firstTaskId = list[0].firstTaskId;
         this.datasource = list;
         this.workCenterData();
-        this.form.singleReport = this.clientEnvironmentId === 2 ? 0 : 1;
+        this.getReportType('report_type');
+        // this.form.singleReport = this.clientEnvironmentId === 2 ? 0 : 1;
       },
       async workCenterData() {
         const res = await listWorkCenter(this.firstTaskId);
@@ -284,6 +287,22 @@
         const res = await lineByCurrentUser(this.form.workCenterId);
         this.productionList = res;
       },
+
+      async getReportType(code) {
+        await parameterGetByCode({ code }).then((res) => {
+          if (res) {
+            this.form.singleReport =
+              this.clientEnvironmentId == 2
+                ? 0
+                : res.value == '0'
+                ? 0
+                : res.value == '1'
+                ? 1
+                : '';
+          }
+        });
+      },
+
       // 查询工位数据
       FirstTaskIdFn() {
         listByFirstTaskId(this.firstTaskId)
@@ -369,7 +388,7 @@
         this.loading = true;
         batchReleaseWorkOrder(dataArr)
           .then((res) => {
-            if ( res){
+            if (res) {
               this.loading = false;
               this.$message.success('操作成功');
               this.cancel();

+ 8 - 2
src/views/workOrder/components/releaseDialog.vue

@@ -388,7 +388,7 @@
           factoryName: '',
           factoryLineIds: ''
         },
-        
+
         processingRequired: 0,
         toolbarLoading: false,
         processList: [],
@@ -623,7 +623,13 @@
         await parameterGetByCode({ code }).then((res) => {
           if (res) {
             this.form.singleReport =
-              this.clientEnvironmentId == 2 ? 0 : res.value == '0' ? 0 : 1;
+              this.clientEnvironmentId == 2
+                ? 0
+                : res.value == '0'
+                ? 0
+                : res.value == '1'
+                ? 1
+                : '';
           }
         });
       },