Переглянути джерело

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dengfei

695593266@qq.com 8 місяців тому
батько
коміт
4ac240c4d4

+ 18 - 1
src/components/selectReleaseRules/search.vue

@@ -11,7 +11,8 @@
     mixins: [dictMixins],
     data() {
       return {
-        typeList: []
+        typeList: [],
+        reportWorkTypeList: []
       };
     },
     computed: {
@@ -36,6 +37,13 @@
             type: 'select',
             placeholder: '记录表分类',
             planList: this.typeList
+          },
+          {
+            label: '模块分类',
+            value: 'reportWorkType',
+            type: 'select',
+            placeholder: '模块分类',
+            planList: this.reportWorkTypeList
           }
           //,
           // {
@@ -70,6 +78,15 @@
           });
         }
       });
+      this.requestDict('记录规则报工类型').then(() => {
+        if (this.$store.state.dict['record_rules_report_work_type']) {
+          this.reportWorkTypeList = this.$store.state.dict[
+            'record_rules_report_work_type'
+          ].map((i) => {
+            return { label: i.dictValue, value: i.dictCode };
+          });
+        }
+      });
     },
     methods: {
       /* 搜索 */

+ 10 - 0
src/components/selectReleaseRules/select-release-rules.vue

@@ -93,6 +93,16 @@
               return this.getDictValue('记录规则类型', row.classify);
             }
           },
+          {
+            prop: 'reportWorkType',
+            label: '模块分类',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (row) => {
+              return this.getDictValue('记录规则报工类型', row.reportWorkType);
+            }
+          },
           {
             prop: 'version',
             label: '版本号',

+ 4 - 1
src/styles/index.scss

@@ -190,4 +190,7 @@ $--ele-font-path: '~ele-admin/es/style/fonts';
     content: "*";
     color: red;
     margin-right: 4px;
-} 
+} 
+.el-input.is-disabled .el-input__inner{
+    color: #606266;
+}

+ 1 - 0
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -740,6 +740,7 @@
           <userSettingMatterProcess
             :produce-task-id="rowData.id"
             :produce-task-name="rowData.name"
+            :produce-task-code="rowData.code"
             ref="userSettingMatterProcessRef"
           ></userSettingMatterProcess>
         </el-tab-pane>

+ 3 - 3
src/views/material/product/components/RemarkInfo.vue

@@ -11,7 +11,7 @@
          <el-row :gutter="24">
            <el-col :span="24">
              <el-form-item label="附件" prop="allowReturns">
-                 <fileUpload v-model="form.remarkAttach" module="file" :limit="4" ></fileUpload>
+                 <fileMain v-model="form.remarkAttach"  ></fileMain>
              </el-form-item>
            </el-col>
            <el-col :span="24">
@@ -25,7 +25,7 @@
 </template>
 
 <script>
-  import fileUpload from '@/components/upload/fileUpload';
+  // import fileUpload from '@/components/upload/fileUpload';
   export default {
     props: {
       form: {
@@ -33,7 +33,7 @@
         default: {}
       }
     },
-    components: { fileUpload },
+    // components: { fileUpload },
     data () {
       return {};
     },

+ 1 - 0
src/views/material/product/detail.vue

@@ -1044,6 +1044,7 @@
           ...info.category
         };
         this.remarkform.remark = info.category.remark;
+        this.remarkform.remarkAttach = info.category.remarkAttach;
         // if (this.form.measuringUnit && this.form.packingUnit) {
         //   this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
         // }

+ 4 - 1
src/views/rulesManagement/releaseRules/components/ProductModal.vue

@@ -140,7 +140,8 @@
           size: limit,
           categoryLevelId: this.categoryLevelId,
           isProduct: true,
-          produceTaskCode: this.produceTaskCode
+          produceTaskCode: this.produceTaskCode,
+          bomTypes: [1, 2, 3]
         });
       },
       handleNodeClick(data) {
@@ -166,6 +167,8 @@
             this.$refs.table.setSelectedRows([]);
           });
         }
+        // 刷新表格
+        this.reload();
         console.log('this.selection', this.selection);
       },
       handleClose() {

+ 0 - 7
src/views/rulesManagement/releaseRules/components/historyModal.vue

@@ -99,13 +99,6 @@
               return `${row.bigVersion}${row.versionMark}${row.smallVersion}`;
             }
           },
-          {
-            prop: 'fromName',
-            label: '来源版本',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 150
-          },
           {
             prop: 'startDate',
             label: '启用日期',

+ 74 - 21
src/views/rulesManagement/releaseRules/components/permitAdd.vue

@@ -224,6 +224,7 @@
           >
             <template v-slot:action="{ row }">
               <el-link
+                v-if="type != 'detail'"
                 type="danger"
                 :underline="false"
                 icon="el-icon-delete"
@@ -272,14 +273,29 @@
         :cache-key="cacheKeyUrl"
       >
         <template v-slot:toolbar>
-          <el-button
-            type="primary"
-            icon="el-icon-plus"
-            class="ele-btn-icon"
-            @click="addRow"
-          >
-            新建
-          </el-button>
+          <div style="display: flex; align-items: center; gap: 10px">
+            <el-button
+              type="primary"
+              icon="el-icon-plus"
+              class="ele-btn-icon"
+              @click="addRow"
+            >
+              新建
+            </el-button>
+
+            <el-form-item
+              v-if="formData.executeMethodTitle"
+              label="编辑执行方式:"
+              label-width="110px"
+              style="margin-bottom: 0"
+            >
+              <el-input
+                type="text"
+                :disabled="formData.executeMethodTitle == '无执行方式'"
+                v-model="executeMethodTitleComputed"
+              />
+            </el-form-item>
+          </div>
         </template>
 
         <template v-slot:paramType="{ row }">
@@ -437,18 +453,20 @@
         </template>
 
         <template v-slot:executeMethodTitle="{ row }">
-          <el-select v-model="row.executeMethodTitle" clearable size="mini">
+          <!-- <el-select v-model="row.executeMethodTitle" clearable size="mini">
             <el-option
               v-for="item in formData.executeMethodList"
               :key="item"
               :label="item"
               :value="item"
             ></el-option>
-          </el-select>
+          </el-select> -->
+          {{ row.executeMethodTitle }}
         </template>
 
         <template v-slot:action="{ row }">
           <el-link
+            v-if="type != 'detail'"
             type="danger"
             :underline="false"
             icon="el-icon-delete"
@@ -622,7 +640,7 @@
             label: '执行方式',
             align: 'center',
             slot: 'executeMethodTitle',
-            minWidth: 180
+            minWidth: 110
           },
           {
             columnKey: 'action',
@@ -636,7 +654,7 @@
         ];
       },
       versionText() {
-        if (this.type == 'clone') {
+        if (this.type == 'change') {
           return '系统自动生成';
         }
         return (
@@ -701,6 +719,34 @@
         } else {
           return this.formData.details;
         }
+      },
+      executeMethodTitleComputed: {
+        get() {
+          return this.formData.executeMethodTitle;
+        },
+        set(value) {
+          // 更改 明细表的 executeMethodTitle
+          this.formData.details = this.formData.details.map((i) => {
+            if (i.executeMethodTitle == this.formData.executeMethodTitle) {
+              return {
+                ...i,
+                executeMethodTitle: value
+              };
+            }
+            return i;
+          });
+
+          this.formData.executeMethodList = this.formData.executeMethodList.map(
+            (i) => {
+              if (i == this.formData.executeMethodTitle) {
+                return value;
+              }
+              return i;
+            }
+          );
+
+          this.formData.executeMethodTitle = value;
+        }
       }
     },
     data() {
@@ -822,11 +868,12 @@
         this.type = type;
         console.log('type', type, row);
 
-        if (type == 'edit' || type == 'detail') {
-          this.getDetils(row.id);
-        }
-
-        if (type == 'clone') {
+        if (
+          type == 'edit' ||
+          type == 'detail' ||
+          type == 'change' ||
+          type == 'clone'
+        ) {
           this.getDetils(row.id);
         }
 
@@ -925,12 +972,18 @@
           this.formData.classify = this.formData.classify + '';
           this.formData.reportWorkType = this.formData.reportWorkType + '';
 
-          if (this.type == 'clone') {
+          if (this.type == 'change') {
             this.formData.name = this.formData.name + '-副本';
 
             this.formData.fromId = id;
             this.formData.id = null;
           }
+
+          if (this.type == 'clone') {
+            this.formData.fromId = null;
+            this.formData.id = null;
+          }
+
           this.loading = false;
         } catch (error) {
           this.loading = false;
@@ -984,7 +1037,7 @@
               const exists = this.formData.details.some(
                 (detail) => detail.executeMethodTitle === item
               );
-              if (!exists) {
+              if (!exists && item != '无执行方式') {
                 this.$message.warning(
                   `请为执行方式 "${item}" 添加至少一条规则项`
                 );
@@ -1005,9 +1058,9 @@
 
             const body = this.formatBody();
 
-            if (this.type == 'add') {
+            if (this.type == 'add' || this.type == 'clone') {
               await recordrulesSave(body);
-            } else if (this.type == 'clone') {
+            } else if (this.type == 'change') {
               await recordrulesUpdateVersion(body);
             } else {
               // 编辑

+ 52 - 22
src/views/rulesManagement/releaseRules/components/processModal.vue

@@ -19,6 +19,14 @@
         :selection.sync="selection"
         row-key="id"
       >
+        <template v-slot:radio="{ row }">
+          <el-radio
+            v-model="currentId"
+            :label="row.id"
+            @change="radioChagne(row)"
+            >{{ '' }}</el-radio
+          >
+        </template>
       </ele-pro-table>
     </el-card>
 
@@ -43,22 +51,10 @@
         default: false
       }
     },
-    data() {
-      return {
-        visible: false,
-        title: '选择工序',
-
-        // 表格列配置
-        columns: [
-          {
-            columnKey: 'selection',
-            type: 'selection',
-            width: 45,
-            align: 'center',
-            reserveSelection: true,
-            fixed: 'left'
-          },
-
+    computed: {
+      // 表格列配置
+      columns() {
+        const arr = [
           {
             prop: 'code',
             label: '工序编码',
@@ -88,10 +84,38 @@
             showOverflowTooltip: true,
             minWidth: 110
           }
-        ],
+        ];
 
+        // 如果多选,添加选择列
+        if (this.multiple) {
+          arr.unshift({
+            columnKey: 'selection',
+            type: 'selection',
+            width: 50,
+            align: 'center',
+            reserveSelection: true,
+            fixed: 'left'
+          });
+        } else {
+          arr.unshift({
+            width: 50,
+            align: 'center',
+            fixed: 'left',
+            slot: 'radio'
+          });
+        }
+
+        return arr;
+      }
+    },
+    data() {
+      return {
+        visible: false,
+        title: '选择工序',
         // 表格选中数据
-        selection: []
+        selection: [],
+        currentId: null,
+        currentObject: null
       };
     },
 
@@ -145,18 +169,24 @@
         this.visible = false;
       },
       selected() {
-        if (!this.selection.length) {
+        if (this.multiple && !this.selection.length) {
           this.$message.warning('请选择工序');
           return;
         }
-        if (!this.multiple && this.selection.length > 1) {
-          return this.$message.warning('只能选择一项');
+
+        if (!this.multiple && !this.currentObject) {
+          this.$message.warning('请选择工序');
+          return;
         }
+
         this.$emit(
           'chooseProcess',
-          this.multiple ? this.selection : this.selection[0]
+          this.multiple ? this.selection : this.currentObject
         );
         this.handleClose();
+      },
+      radioChagne(e) {
+        this.currentObject = e;
       }
     }
   };

+ 18 - 1
src/views/rulesManagement/releaseRules/components/search.vue

@@ -11,7 +11,8 @@
     mixins: [dictMixins],
     data() {
       return {
-        typeList: []
+        typeList: [],
+        reportWorkTypeList: []
       };
     },
     computed: {
@@ -37,6 +38,13 @@
             placeholder: '记录表分类',
             planList: this.typeList
           },
+          {
+            label: '模块分类',
+            value: 'reportWorkType',
+            type: 'select',
+            placeholder: '模块分类',
+            planList: this.reportWorkTypeList
+          },
           {
             label: '状态:',
             value: 'publishStatus',
@@ -69,6 +77,15 @@
           });
         }
       });
+      this.requestDict('记录规则报工类型').then(() => {
+        if (this.$store.state.dict['record_rules_report_work_type']) {
+          this.reportWorkTypeList = this.$store.state.dict[
+            'record_rules_report_work_type'
+          ].map((i) => {
+            return { label: i.dictValue, value: i.dictCode };
+          });
+        }
+      });
     },
     methods: {
       /* 搜索 */

+ 23 - 4
src/views/rulesManagement/releaseRules/index.vue

@@ -22,11 +22,20 @@
         <!-- <template v-slot:status="{ row }"> </template> -->
         <template v-slot:action="{ row }">
           <el-link
-            v-if="row.publishStatus === 1"
+            type="primary"
+            :underline="false"
+            icon="el-icon-document-copy"
+            @click="addPermit(row, 'clone', '克隆记录规则')"
+          >
+            克隆
+          </el-link>
+
+          <el-link
+            v-if="row.publishStatus === 1 && !row.isUpdatedVersion"
             type="success"
             :underline="false"
             icon="el-icon-finished"
-            @click="addPermit(row, 'clone', '变更记录规则')"
+            @click="addPermit(row, 'change', '变更记录规则')"
           >
             变更
           </el-link>
@@ -163,6 +172,16 @@
               return this.getDictValue('记录规则类型', row.classify);
             }
           },
+          {
+            prop: 'reportWorkType',
+            label: '模块分类',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (row) => {
+              return this.getDictValue('记录规则报工类型', row.reportWorkType);
+            }
+          },
           {
             prop: 'version',
             label: '版本号',
@@ -170,7 +189,7 @@
             showOverflowTooltip: true,
             minWidth: 110,
             formatter: (row) => {
-              return `${row.bigVersion}${row.versionMark}${row.smallVersion}`;
+              return `${row.versionSymbol}${row.bigVersion}${row.versionMark}${row.smallVersion}`;
             }
           },
           {
@@ -258,7 +277,7 @@
           {
             columnKey: 'action',
             label: '操作',
-            width: 230,
+            width: 260,
             align: 'center',
             resizable: false,
             slot: 'action',

+ 11 - 0
src/views/technology/production/components/user-setting-matter-process.vue

@@ -87,6 +87,17 @@
       produceTaskName: {
         type: String,
         required: true
+      },
+      // 工序code
+      produceTaskCode: {
+        type: String,
+        required: false,
+        default: ''
+      }
+    },
+    watch: {
+      produceTaskId() {
+        this.getMatterList();
       }
     },
     data() {

+ 34 - 2
src/views/versionManage/components/addOrEditDialog.vue

@@ -61,6 +61,21 @@
           </el-form-item>
         </el-col>
       </el-row>
+      <el-row :gutter="12">
+        <el-col :span="16">
+          <el-form-item label="版本符号" prop="symbol">
+            <el-input
+              v-model="form.symbol"
+              :disabled="type == 'view'"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <span style="margin-left: 10px; line-height: 38px; color: red"
+            >默认字母V,字母A-Z</span
+          >
+        </el-col>
+      </el-row>
       <el-row :gutter="12">
         <el-col :span="16">
           <el-form-item label="大版本采用" prop="bigVersionType">
@@ -192,7 +207,8 @@
           mark: '.',
           smallVersion: '1',
           smallVersionNum: 1,
-          changeType: 1
+          changeType: 1,
+          symbol: 'V'
         }
       };
     },
@@ -200,7 +216,9 @@
       getExample() {
         let value =
           this.form.bigVersion || (this.form.bigVersionType == 1 ? 'A' : '1');
-        return value + this.form.mark + this.form.smallVersion;
+        return (
+          this.form.symbol + value + this.form.mark + this.form.smallVersion
+        );
       },
       rules() {
         return {
@@ -225,6 +243,20 @@
           smallVersion: [
             { required: true, message: '请输入', trigger: 'blur' },
             { validator: this.versionNumValidate, trigger: ['blur', 'change'] }
+          ],
+          symbol: [
+            {
+              required: false,
+              validator(rule, value, callback) {
+                if (!value) callback();
+                let regex = /[A-Z]/;
+                if (!regex.test(value)) {
+                  callback(new Error('输入格式错误'));
+                }
+                callback();
+              },
+              trigger: 'blur'
+            }
           ]
         };
       }

+ 3 - 1
src/views/versionManage/index.vue

@@ -194,7 +194,9 @@
             showOverflowTooltip: true,
             align: 'center',
             formatter: (_row, _column, cellValue) => {
-              return _row.bigVersion + _row.mark + _row.smallVersion;
+              return (
+                _row.symbol + _row.bigVersion + _row.mark + _row.smallVersion
+              );
             },
             minWidth: 120
           },

+ 2 - 2
vue.config.js

@@ -35,14 +35,14 @@ module.exports = {
         // target: 'http://192.168.1.105:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.176:18086',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.251:18086',
 
         // target: 'http://192.168.1.251:18086', // 开发
-        // target: 'http://192.168.1.116:18086', // 赵沙金
+        target: 'http://192.168.1.116:18086', // 赵沙金
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {

Різницю між файлами не показано, бо вона завелика
+ 346 - 153
yarn.lock


Деякі файли не було показано, через те що забагато файлів було змінено