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

【修改】零售发货申请单、工程发货申请

howie 2 лет назад
Родитель
Сommit
3a755812e0

+ 20 - 44
src/views/supply/apply/apply_list.vue

@@ -3,7 +3,7 @@
     <div v-show="!isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm">
       <!-- 筛选条件 -->
       <div class="screen-container">
-        <Collapse :screen-form="screenForm">
+        <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
           <template #left_btn>
             <el-radio-group v-model="screenForm.status" size="mini" @change="getList()">
               <el-radio-button label="">全部</el-radio-button>
@@ -376,13 +376,9 @@
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
-                    ($checkBtnRole('apply', $route.meta.roles) &&
-                      !scope.row.automaticStatus &&
-                      scope.row.examineStatus === 'SAVE') ||
-                    ($checkBtnRole('apply', $route.meta.roles) &&
-                      scope.row.automaticStatus &&
-                      scope.row.examineStatus === 'SAVE' &&
-                      scope.row.type == 2)
+                    $checkBtnRole('apply', $route.meta.roles) &&
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'SAVE'
                   "
                   style="margin-right: 10px"
                   title="确定申请吗?"
@@ -392,13 +388,9 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    ($checkBtnRole('apply', $route.meta.roles) &&
-                      !scope.row.automaticStatus &&
-                      scope.row.examineStatus === 'WAIT') ||
-                    ($checkBtnRole('apply', $route.meta.roles) &&
-                      scope.row.automaticStatus &&
-                      scope.row.examineStatus === 'WAIT' &&
-                      scope.row.type == 2)
+                    $checkBtnRole('apply', $route.meta.roles) &&
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT'
                   "
                   style="margin-right: 10px"
                   title="确定撤回吗?"
@@ -408,13 +400,9 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    ($checkBtnRole('examine', $route.meta.roles) &&
-                      !scope.row.automaticStatus &&
-                      scope.row.examineStatus === 'OK') ||
-                    ($checkBtnRole('examine', $route.meta.roles) &&
-                      scope.row.automaticStatus &&
-                      scope.row.examineStatus === 'OK' &&
-                      scope.row.type == 2)
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'OK'
                   "
                   style="margin-right: 10px"
                   title="确定弃审吗?"
@@ -436,13 +424,10 @@
                 </el-button>
                 <el-button
                   v-if="
-                    ($checkBtnRole('del', $route.meta.roles) &&
-                      !scope.row.automaticStatus &&
-                      scope.row.examineStatus !== 'OK') ||
-                    ($checkBtnRole('del', $route.meta.roles) &&
-                      scope.row.examineStatus !== 'OK' &&
-                      scope.row.automaticStatus &&
-                      scope.row.type == 2)
+                    $checkBtnRole('edit', $route.meta.roles) &&
+                    !scope.row.automaticStatus &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
+                    scope.row.type === 2
                   "
                   type="text"
                   @click="toReturnForm(scope.row)"
@@ -451,13 +436,9 @@
                 </el-button>
                 <el-button
                   v-if="
-                    ($checkBtnRole('examine', $route.meta.roles) &&
-                      !scope.row.automaticStatus &&
-                      scope.row.examineStatus === 'WAIT') ||
-                    ($checkBtnRole('examine', $route.meta.roles) &&
-                      scope.row.examineStatus === 'WAIT' &&
-                      scope.row.automaticStatus &&
-                      scope.row.type === 2)
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT'
                   "
                   type="text"
                   @click="toExamine(scope.row)"
@@ -467,14 +448,9 @@
                 <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
                 <el-popconfirm
                   v-if="
-                    ($checkBtnRole('del', $route.meta.roles) &&
-                      !scope.row.automaticStatus &&
-                      scope.row.type == 2 &&
-                      (scope.row.examineStatus !== 'OK' || scope.row.examineStatus === 'SAVE')) ||
-                    ($checkBtnRole('del', $route.meta.roles) &&
-                      scope.row.automaticStatus &&
-                      scope.row.type == 2 &&
-                      (scope.row.examineStatus !== 'OK' || scope.row.examineStatus === 'SAVE'))
+                    $checkBtnRole('del', $route.meta.roles) &&
+                    !scope.row.automaticStatus &&
+                    scope.row.examineStatus !== 'OK'
                   "
                   style="margin-left: 10px"
                   title="确定删除吗?"

+ 18 - 41
src/views/supply/apply/engin_list.vue

@@ -3,7 +3,7 @@
     <div v-show="!isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm">
       <!-- 筛选条件 -->
       <div class="screen-container">
-        <Collapse :screen-form="screenForm">
+        <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
           <template #left_btn>
             <el-radio-group size="mini" v-model="screenForm.status" @change="getList()">
               <el-radio-button label="">全部</el-radio-button>
@@ -406,13 +406,9 @@
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
-                    (!scope.row.automaticStatus &&
-                      $checkBtnRole('apply', $route.meta.roles) &&
-                      scope.row.examineStatus === 'SAVE') ||
-                    ($checkBtnRole('apply', $route.meta.roles) &&
-                      scope.row.examineStatus === 'SAVE' &&
-                      scope.row.automaticStatus &&
-                      scope.row.type === 2)
+                    !scope.row.automaticStatus &&
+                    $checkBtnRole('apply', $route.meta.roles) &&
+                    scope.row.examineStatus === 'SAVE'
                   "
                   style="margin-right: 10px"
                   title="确定申请吗?"
@@ -422,13 +418,9 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    (!scope.row.automaticStatus &&
-                      $checkBtnRole('apply', $route.meta.roles) &&
-                      scope.row.examineStatus === 'WAIT') ||
-                    ($checkBtnRole('apply', $route.meta.roles) &&
-                      scope.row.examineStatus === 'WAIT' &&
-                      scope.row.automaticStatus &&
-                      scope.row.type === 2)
+                    !scope.row.automaticStatus &&
+                    $checkBtnRole('apply', $route.meta.roles) &&
+                    scope.row.examineStatus === 'WAIT'
                   "
                   style="margin-right: 10px"
                   title="确定撤回吗?"
@@ -438,13 +430,9 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    (!scope.row.automaticStatus &&
-                      $checkBtnRole('examine', $route.meta.roles) &&
-                      scope.row.examineStatus === 'OK') ||
-                    ($checkBtnRole('examine', $route.meta.roles) &&
-                      scope.row.examineStatus === 'OK' &&
-                      scope.row.automaticStatus &&
-                      scope.row.type === 2)
+                    !scope.row.automaticStatus &&
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    scope.row.examineStatus === 'OK'
                   "
                   style="margin-right: 10px"
                   title="确定弃审吗?"
@@ -466,14 +454,10 @@
                 </el-button>
                 <el-button
                   v-if="
-                    (!scope.row.automaticStatus &&
-                      $checkBtnRole('edit', $route.meta.roles) &&
-                      (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                      scope.row.type === 2) ||
-                    ($checkBtnRole('examine', $route.meta.roles) &&
-                      (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                      scope.row.automaticStatus &&
-                      scope.row.type === 2)
+                    !scope.row.automaticStatus &&
+                    $checkBtnRole('edit', $route.meta.roles) &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
+                    scope.row.type === 2
                   "
                   type="text"
                   @click="toReturnForm(scope.row)"
@@ -482,13 +466,9 @@
                 </el-button>
                 <el-button
                   v-if="
-                    (!scope.row.automaticStatus &&
-                      $checkBtnRole('examine', $route.meta.roles) &&
-                      scope.row.examineStatus === 'WAIT') ||
-                    ($checkBtnRole('examine', $route.meta.roles) &&
-                      scope.row.examineStatus === 'WAIT' &&
-                      scope.row.automaticStatus &&
-                      scope.row.type === 2)
+                    !scope.row.automaticStatus &&
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    scope.row.examineStatus === 'WAIT'
                   "
                   type="text"
                   @click="toExamine(scope.row)"
@@ -498,10 +478,7 @@
                 <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
                 <!--             !scope.row.automaticStatus &&  -->
                 <el-popconfirm
-                  v-if="
-                    (!scope.row.automaticStatus && scope.row.examineStatus !== 'OK') ||
-                    (scope.row.automaticStatus && scope.row.examineStatus !== 'OK' && scope.row.type === 2)
-                  "
+                  v-if="!scope.row.automaticStatus && scope.row.examineStatus !== 'OK'"
                   style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.id)"

+ 11 - 9
src/views/supply/policy/components/retail_form.vue

@@ -944,15 +944,17 @@ export default {
       this.$set(this.mainForm, 'k3ServiceName', user.nickName)
     },
     hasRak(e, row) {
-      if (e) {
-        hasRak({ id: row.materialId }).then(res => {
-          if (res.data) {
-            this.goodsList.forEach(k => {
-              this.$set(k, 'isDirectTransfer', true)
-            })
-          }
-        })
-      }
+      hasRak({ id: row.materialId }).then(res => {
+        if (res.data && e) {
+          this.goodsList.forEach(k => {
+            this.$set(k, 'isDirectTransfer', true)
+          })
+        } else {
+          this.goodsList.forEach(k => {
+            this.$set(k, 'isDirectTransfer', false)
+          })
+        }
+      })
     },
     // 返回列表
     goBack() {

+ 11 - 9
src/views/supply/retail/components/retail_form.vue

@@ -735,15 +735,17 @@ export default {
       })
     },
     hasRak(e, row) {
-      if (e) {
-        hasRak({ id: row.materialId }).then(res => {
-          if (res.data) {
-            this.goodsList.forEach(k => {
-              this.$set(k, 'isDirectTransfer', true)
-            })
-          }
-        })
-      }
+      hasRak({ id: row.materialId }).then(res => {
+        if (res.data && e) {
+          this.goodsList.forEach(k => {
+            this.$set(k, 'isDirectTransfer', true)
+          })
+        } else {
+          this.goodsList.forEach(k => {
+            this.$set(k, 'isDirectTransfer', false)
+          })
+        }
+      })
     },
     // 获取销售类型列表
     getSalesTypeList() {