Browse Source

fix: 零售政策

zh 2 years ago
parent
commit
a97da3f724

+ 1 - 0
src/views/supply/policy/components/retail_form.vue

@@ -323,6 +323,7 @@
       :close-on-click-modal="false"
       title="引用销售政策"
       @close="handleClose"
+    :append-to-body="true"
     >
       <template>
         <el-form ref="screenForm" :model="screenForm" label-width="120px" label-position="left" size="small">

+ 13 - 10
src/views/supply/policy/policy_list.vue

@@ -6,6 +6,8 @@
     :operation="operation()"
     :optionsEvensGroup="optionsEvensGroup"
     :columnParsing="columnParsing"
+    :tableEvents="tableEvents"
+    :tableAttributes="tableAttributes"
   >
     <Popu v-if="isShowDetail || isShowForm || isShowExamine || isShowReturn">
       <RetailDetail v-if="isShowDetail" :list-item="queryItem" @backListFormDetail="backList" />
@@ -76,9 +78,9 @@ export default {
           [
             {
               name: '批量审批',
-              click: this.addOn(() => {
+              click: ()=>{
                 this.batchExamine()
-              }),
+              },
               isRole: this.$checkBtnRole('examine', this.$route.meta.roles)
             }
           ]
@@ -181,21 +183,22 @@ export default {
     },
     operation() {
       return (h, { row, index, column }) => {
+        const statusData = JSON.parse("{\"FAIL_ONE\":\"初审不通过\",\"REJECT\":\"驳回\",\"OK_ONE_AND_CONFIRM\":\"已确认未复核\",\"ABANDON\":\"弃审\",\"SAVE\":\"保存\",\"CLOSE\":\"关闭\",\"OK\":\"审核通过\",\"WAIT\":\"待审核\",\"FAIL\":\"审核不通过\",\"OK_ONE\":\"初审通过\"}")
         return (
           <div class="operation-btns">
-            {row.examineStatus === 'SAVE' ? (
+            {row.examineStatus === statusData['SAVE'] ? (
               <el-popconfirm style="margin-left: 10px" title="确定提审?" onOnConfirm={() => this.handleSubmit(row.id)}>
                 <el-button slot="reference" type="text">
                   提审
                 </el-button>
               </el-popconfirm>
             ) : null}
-            {row.examineStatus == 'WAIT' && this.$checkBtnRole('examine', this.$route.meta.roles) ? (
+            {row.examineStatus ==statusData['WAIT'] && this.$checkBtnRole('examine', this.$route.meta.roles) ? (
               <el-button style="margin-left: 10px" type="text" onClick={() => this.toExamine(row)}>
                 审核
               </el-button>
             ) : null}
-            {this.$checkBtnRole('del', this.$route.meta.roles) && row.examineStatus === 'SAVE' ? (
+            {this.$checkBtnRole('del', this.$route.meta.roles) && row.examineStatus === statusData['SAVE'] ? (
               <el-popconfirm
                 style="margin-left: 10px"
                 title="确定删除吗?"
@@ -206,12 +209,12 @@ export default {
                 </el-button>
               </el-popconfirm>
             ) : null}
-            {row.examineStatus === 'SAVE' && this.$checkBtnRole('edit', this.$route.meta.roles) ? (
+            {row.examineStatus === statusData['SAVE'] && this.$checkBtnRole('edit', this.$route.meta.roles) ? (
               <el-button style="margin-left: 10px" type="text" onClick="toForm(row)">
                 编辑
               </el-button>
             ) : null}
-            {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === 'OK' ? (
+            {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === statusData['OK'] ? (
               <el-popconfirm
                 style="margin-left: 10px"
                 title="确定弃审吗?"
@@ -222,7 +225,7 @@ export default {
                 </el-button>
               </el-popconfirm>
             ) : null}
-            {row.examineStatus == 'WAIT' && this.$checkBtnRole('apply', this.$route.meta.roles) ? (
+            {row.examineStatus == statusData['WAIT'] && this.$checkBtnRole('apply', this.$route.meta.roles) ? (
               <el-popconfirm style="margin-left: 10px" title="确定撤回?" onOnConfirm={() => this.handleCancel(row.id)}>
                 <el-button slot="reference" type="text">
                   撤回
@@ -233,12 +236,12 @@ export default {
               详情
             </el-button>
 
-            {row.examineStatus === 'OK' && this.$checkBtnRole('examine', this.$route.meta.roles) ? (
+            {row.examineStatus === statusData['OK'] && this.$checkBtnRole('examine', this.$route.meta.roles) ? (
               <el-button style="margin-left: 10px" type="text" onClick={() => this.toReturn(row)}>
                 退订
               </el-button>
             ) : null}
-            {row.examineStatus === 'SAVE' && this.$checkBtnRole('examine', this.$route.meta.roles) ? (
+            {row.examineStatus === statusData['SAVE'] && this.$checkBtnRole('examine', this.$route.meta.roles) ? (
               <el-popconfirm
                 style="margin-left: 10px"
                 title="确定关闭吗?"

+ 12 - 8
src/views/supply/retail/retail_list.vue

@@ -134,9 +134,13 @@ export default {
     },
     operation() {
       return (h, { row, index, column }) => {
+        const statusData = JSON.parse(
+          '{"FAIL_ONE":"初审不通过","REJECT":"驳回","OK_ONE_AND_CONFIRM":"已确认未复核","ABANDON":"弃审","SAVE":"保存","CLOSE":"关闭","OK":"审核通过","WAIT":"待审核","FAIL":"审核不通过","OK_ONE":"初审通过"}'
+        )
+
         return (
           <div class="operation-btns">
-            {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus === 'SAVE' ? (
+            {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus === statusData['SAVE'] ? (
               <el-popconfirm
                 style="margin-right: 10px"
                 title="确定申请吗?"
@@ -148,7 +152,7 @@ export default {
               </el-popconfirm>
             ) : null}
 
-            {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus === 'WAIT' ? (
+            {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus === statusData['WAIT'] ? (
               <el-popconfirm
                 style="margin-right: 10px"
                 title="确定撤回吗?"
@@ -159,7 +163,7 @@ export default {
                 </el-button>
               </el-popconfirm>
             ) : null}
-            {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === 'OK' ? (
+            {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === statusData['OK'] ? (
               <el-popconfirm
                 style="margin-right: 10px"
                 title="确定弃审吗?"
@@ -172,7 +176,7 @@ export default {
             ) : null}
             {this.$checkBtnRole('examine', this.$route.meta.roles) &&
             !row.closeTime &&
-            (row.examineStatus === 'SAVE' || row.examineStatus === 'WAIT') ? (
+            (row.examineStatus === statusData['SAVE'] || row.examineStatus === statusData['WAIT']) ? (
               <el-popconfirm
                 style="margin-right: 10px"
                 title="确定关闭吗?"
@@ -183,7 +187,7 @@ export default {
                 </el-button>
               </el-popconfirm>
             ) : null}
-            {this.$checkBtnRole('del', this.$route.meta.roles) && row.examineStatus === 'SAVE' ? (
+            {this.$checkBtnRole('del', this.$route.meta.roles) && row.examineStatus === statusData['SAVE'] ? (
               <el-popconfirm
                 style="margin-right: 10px"
                 title="确定删除吗?"
@@ -194,17 +198,17 @@ export default {
                 </el-button>
               </el-popconfirm>
             ) : null}
-            {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === 'WAIT' ? (
+            {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === statusData['WAIT'] ? (
               <el-button type="text" onClick={() => this.toExamine(row)}>
                 审批
               </el-button>
             ) : null}
-            {this.$checkBtnRole('edit', this.$route.meta.roles) && row.examineStatus === 'SAVE' ? (
+            {this.$checkBtnRole('edit', this.$route.meta.roles) && row.examineStatus === statusData['SAVE'] ? (
               <el-button type="text" onClick={() => toForm(row)}>
                 编辑
               </el-button>
             ) : null}
-            {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === 'OK' ? (
+            {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === statusData['OK'] ? (
               <el-button type="text" onClick={() => this.toReturn(row)}>
                 退订
               </el-button>