Просмотр исходного кода

字典补充、放行模板添加字段

lucw 6 месяцев назад
Родитель
Сommit
8561a59e85

+ 2 - 1
src/enum/dict.js

@@ -82,7 +82,8 @@ export default {
   班次时间类型: 'workShift_tiemType',
   业务类型: 'business_type',
   行业类别: 'industry_type',
-  记录表模板样式: 'record_template_style'
+  记录表模板样式: 'record_template_style',
+  放行类型: 'checklist_type'
 };
 
 export const numberList = [

+ 27 - 4
src/views/checklistManagement/components/templateAdd.vue

@@ -28,6 +28,18 @@
             </DictSelection>
           </el-form-item>
         </el-col>
+        <el-col v-if="form.checklistType == '1'" :span="8">
+          <el-form-item
+            label="是否自动指定模板"
+            prop="autoProduct"
+            label-width="140px"
+          >
+            <el-radio-group v-model="form.autoProduct">
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
         <el-col :span="8">
           <el-form-item label="放行模板编码">
             <el-input
@@ -45,8 +57,6 @@
             ></el-input>
           </el-form-item>
         </el-col>
-      </el-row>
-      <el-row style="margin-bottom: 15px" gap="10">
         <el-col :span="8">
           <el-form-item label="状态" prop="enable">
             <el-radio-group v-model="form.enable">
@@ -290,7 +300,8 @@
         remark: '',
         templateCode: '',
         templateName: '',
-        checklistType: ''
+        checklistType: '',
+        autoProduct: 0
       };
 
       return {
@@ -411,6 +422,7 @@
           const res = await checklisttemplateGetById(id);
           console.log('res', res);
           this.$util.assignObject(this.form, res);
+          this.form.checklistType = this.form.checklistType + '';
 
           this.loading = false;
         } catch (error) {
@@ -604,4 +616,15 @@
   };
 </script>
 
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+  :deep(.el-row) {
+    display: flex;
+    flex-wrap: wrap;
+  }
+
+  :deep(.el-form) {
+    .el-form-item:last-child {
+      margin-bottom: 22px !important;
+    }
+  }
+</style>

+ 14 - 0
src/views/checklistManagement/templatelist.vue

@@ -91,6 +91,20 @@
             showOverflowTooltip: true,
             slot: 'templateCode'
           },
+          {
+            prop: 'autoProduct',
+            label: '是否自动成品放行指定模板',
+            align: 'center',
+            minWidth: 130,
+            showOverflowTooltip: true,
+            formatter: (row) => {
+              if (row.checklistType == '1') {
+                return row.autoProduct == 1 ? '是' : '否';
+              }
+
+              return '';
+            }
+          },
           {
             prop: 'templateName',
             label: '放行单名称',