ソースを参照

Finish Hotfix-zh-317

zhouhao 2 年 前
コミット
cb564a8d70

+ 42 - 25
src/views/supply/apply/apply_list.vue

@@ -7,10 +7,12 @@
           <template #left_btn>
             <el-radio-group v-model="screenForm.status" size="mini" @change="getList()">
               <el-radio-button label="">全部</el-radio-button>
-              <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{
-                  item.label
-                }}
-              </el-radio-button>
+              <template v-for="(item, index) in statusList">
+                <el-radio-button v-if="index !== 3" :key="index" :label="item.value">{{
+                    item.label
+                  }}
+                </el-radio-button>
+              </template>
             </el-radio-group>
           </template>
           <template #right_btn>
@@ -382,8 +384,13 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('apply', $route.meta.roles) &&
-                    !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'SAVE'
+                    (( !isCustomer && !scope.row.automaticStatus &&
+                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL'))||(isCustomer && !scope.row.automaticStatus &&
+                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL') && scope.row.type!=2) || (
+                    !isCustomer  &&  scope.row.automaticStatus &&
+                     (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL') &&
+                     scope.row.type===2
+                    ) )
                   "
                   style="margin-right: 10px"
                   title="确定申请吗?"
@@ -394,8 +401,10 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('apply', $route.meta.roles) &&
-                    !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT'
+                    ((!isCustomer &&!scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT') ||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT' && scope.row.type!=2)||( !isCustomer  && scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT'&& scope.row.type==2))
                   "
                   style="margin-right: 10px"
                   title="确定撤回吗?"
@@ -406,8 +415,10 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK'
+                    ((!isCustomer &&!scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'OK')||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'OK' && scope.row.type!=2)||( !isCustomer && scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'OK' && scope.row.type==2))
                   "
                   style="margin-right: 10px"
                   title="确定弃审吗?"
@@ -429,14 +440,15 @@
                 </el-button>
                 <el-button
                   v-if="
-                    ($checkBtnRole('edit', $route.meta.roles) &&
-                      !scope.row.automaticStatus &&
+                    $checkBtnRole('edit', $route.meta.roles) &&
+                      ((!isCustomer && !scope.row.automaticStatus &&
                       (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                      scope.row.type === 2) ||
-                    ($checkBtnRole('edit', $route.meta.roles) &&
-                      scope.row.automaticStatus &&
-                      scope.row.examineStatus === 'SAVE' &&
-                      scope.row.type == 2)
+                      scope.row.type === 2)||(isCustomer && !scope.row.automaticStatus &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') && scope.row.type!=2 && scope.row.type !==1)  ||
+                      ( !isCustomer && scope.row.automaticStatus &&
+                     (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
+                     scope.row.type===2)
+                      )
                   "
                   type="text"
                   @click="toReturnForm(scope.row)"
@@ -446,20 +458,23 @@
                 <el-button
                   v-if="
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT'
+                    ((!isCustomer &&!scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT') ||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus !== 'WAIT' && scope.row.type!=2) || (!isCustomer && scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT' && scope.row.type==2))
                   "
                   type="text"
                   @click="toExamine(scope.row)"
                 >
-                  审
+                  审
                 </el-button>
                 <el-button type="text" @click="toDetail(scope.row)"> 详情</el-button>
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('del', $route.meta.roles) &&
-                    !scope.row.automaticStatus &&
-                    scope.row.examineStatus !== 'OK'
+                    ((!isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus !== 'OK' ) ||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus !== 'OK' && scope.row.type!=2)   || ( !isCustomer &&scope.row.automaticStatus && scope.row.examineStatus !== 'OK' && scope.row.type==2 ) )
                   "
                   style="margin-left: 10px"
                   title="确定删除吗?"
@@ -554,7 +569,7 @@ export default {
         { label: '已保存', value: 'SAVE' },
         { label: '待审核', value: 'WAIT' },
         { label: '审核通过', value: 'OK' },
-        //  // { label: '审核驳回', value: 'FAIL' },,
+        { label: '审核驳回', value: 'FAIL' },
         { label: '已关闭', value: 'CLOSE' }
       ],
       orderTypeList: [
@@ -577,7 +592,9 @@ export default {
         status: '',
         remark: ''
       },
-      categoryList: []
+      categoryList: [],
+      isCustomer: JSON.parse(localStorage.getItem('supply_user')).isCustomer
+
     }
   },
 
@@ -803,7 +820,7 @@ export default {
       ids = Array.from(new Set(ids))
       examineBatchApply({
         ids: ids.join(','),
-        examineStatus: this.examineForm.status,
+        examineStatus: this.examineForm.status === 'FAIL' ? 'SAVE' : 'OK',
         approvalRemark: this.examineForm.remark
       }).then(res => {
         this.isShowExamineDialog = false

+ 5 - 8
src/views/supply/apply/components/apply_form.vue

@@ -470,14 +470,11 @@ export default {
         this.mainForm.headerRemark = data.headerRemark
         this.mainForm.remark = data.remark
         this.screenForm.warehouse = data.correspondId
-        this.fileList = data.fileUrl
-          ? [
-              {
-                url: data.fileUrl,
-                name: data.fileName
-              }
-            ]
-          : []
+        data.salesOrderPictures.forEach(k => {
+          k.name = k.fileName
+          k.url = k.fileUrl
+        })
+        this.fileList =  data.salesOrderPictures
         // data.orders.forEach(item => {
         //   item.orderId = item.id;
         // })

+ 5 - 8
src/views/supply/apply/components/apply_return_form.vue

@@ -512,14 +512,11 @@ export default {
         this.mainForm.createMan = data.createBy
         this.mainForm.remark = data.remark
         this.mainForm.warehouse = data.correspondId
-        this.fileList = data.fileUrl
-          ? [
-              {
-                url: data.fileUrl,
-                name: data.fileName
-              }
-            ]
-          : []
+        data.salesOrderPictures.forEach(k => {
+          k.name = k.fileName
+          k.url = k.fileUrl
+        })
+        this.fileList =  data.salesOrderPictures
         // data.orders.forEach(item => {
         //   item.orderId = item.id;
         // })

+ 5 - 8
src/views/supply/apply/components/engin_form.vue

@@ -672,14 +672,11 @@ export default {
         this.mainForm.refTradeCategory = data.refTradeCategory
         this.screenForm.warehouse = data.correspondId
         // this.screenForm.refProjectName = data.refProjectName
-        this.fileList = data.fileUrl
-          ? [
-              {
-                url: data.fileUrl,
-                name: data.fileName
-              }
-            ]
-          : []
+        data.salesOrderPictures.forEach(k => {
+          k.name = k.fileName
+          k.url = k.fileUrl
+        })
+        this.fileList =  data.salesOrderPictures
         // data.orders.forEach(item => {
         //   item.orderId = item.id;
         // })

+ 5 - 8
src/views/supply/apply/components/engin_return_form.vue

@@ -684,14 +684,11 @@ export default {
         this.mainForm.remark = data.remark
         this.mainForm.warehouse = data.correspondId
         this.mainForm.fileNo = data.fileNo
-        this.fileList = data.fileUrl
-          ? [
-              {
-                url: data.fileUrl,
-                name: data.fileName
-              }
-            ]
-          : []
+        data.salesOrderPictures.forEach(k => {
+          k.name = k.fileName
+          k.url = k.fileUrl
+        })
+        this.fileList =  data.salesOrderPictures
         // data.orders.forEach(item => {
         //   item.orderId = item.id;
         // })

+ 55 - 31
src/views/supply/apply/engin_list.vue

@@ -3,13 +3,17 @@
     <div v-show="!isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm">
       <!-- 筛选条件 -->
       <div class="screen-container">
-        <Collapse   :screen-form="screenForm">
+        <Collapse :screen-form="screenForm">
           <template #left_btn>
             <el-radio-group size="mini" v-model="screenForm.status" @change="getList()">
               <el-radio-button label="">全部</el-radio-button>
-              <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{
-                item.label
-              }}</el-radio-button>
+              <template v-for="(item, index) in statusList" >
+                <el-radio-button v-if="index !== 3" :key="index" :label="item.value">{{
+                    item.label
+                  }}
+                </el-radio-button>
+              </template>
+
             </el-radio-group>
           </template>
           <template #right_btn>
@@ -171,7 +175,8 @@
               type="primary"
               icon="el-icon-plus"
               @click="toForm()"
-              >发货申请</el-button
+            >发货申请
+            </el-button
             >
             <el-button
               v-if="$checkBtnRole('refund', $route.meta.roles)"
@@ -179,7 +184,8 @@
               type="primary"
               icon="el-icon-plus"
               @click="toReturnForm()"
-              >退货申请</el-button
+            >退货申请
+            </el-button
             >
             <el-button
               v-if="$checkBtnRole('examine', $route.meta.roles)"
@@ -188,7 +194,8 @@
               icon="el-icon-finished"
               :disabled="multipleSelection.length < 1"
               @click="batchExamine"
-              >批量审批</el-button
+            >批量审批
+            </el-button
             >
           </div>
           <div class="fr">
@@ -406,9 +413,14 @@
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
-                    !scope.row.automaticStatus &&
                     $checkBtnRole('apply', $route.meta.roles) &&
-                    scope.row.examineStatus === 'SAVE'
+                    ((!isCustomer &&!scope.row.automaticStatus &&
+                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL'))||(isCustomer && !scope.row.automaticStatus &&
+                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL') && scope.row.type!=2)  || (
+                     !isCustomer  && scope.row.automaticStatus &&
+                    (scope.row.examineStatus === 'SAVE'|| scope.row.examineStatus === 'FAIL') &&
+                     scope.row.type===2
+                    ) )
                   "
                   style="margin-right: 10px"
                   title="确定申请吗?"
@@ -418,9 +430,11 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    !scope.row.automaticStatus &&
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    scope.row.examineStatus === 'WAIT'
+                  $checkBtnRole('apply', $route.meta.roles) &&
+                    ((!isCustomer &&!scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT') ||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT' && scope.row.type!=2) ||(!isCustomer  && scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT'&& scope.row.type==2))
                   "
                   style="margin-right: 10px"
                   title="确定撤回吗?"
@@ -430,9 +444,11 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    !scope.row.automaticStatus &&
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    scope.row.examineStatus === 'OK'
+                    ((!isCustomer &&!scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'OK')||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'OK' && scope.row.type!=2) ||( !isCustomer  && scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'OK' && scope.row.type==2))
                   "
                   style="margin-right: 10px"
                   title="确定弃审吗?"
@@ -442,7 +458,7 @@
                 </el-popconfirm>
                 <el-button
                   v-if="
-                    !scope.row.automaticStatus &&
+                     !scope.row.automaticStatus &&
                     $checkBtnRole('edit', $route.meta.roles) &&
                     (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                     scope.row.type === 1
@@ -454,14 +470,14 @@
                 </el-button>
                 <el-button
                   v-if="
-                    (!scope.row.automaticStatus &&
-                      $checkBtnRole('edit', $route.meta.roles) &&
+                  $checkBtnRole('edit', $route.meta.roles) &&
+                    (( !isCustomer &&!scope.row.automaticStatus &&
                       (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                      scope.row.type === 2) ||
-                    ($checkBtnRole('edit', $route.meta.roles) &&
-                      scope.row.automaticStatus &&
-                      scope.row.examineStatus === 'SAVE' &&
-                      scope.row.type == 2)
+                      scope.row.type === 2 )||(isCustomer && !scope.row.automaticStatus &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') && scope.row.type!=2 && scope.type!==1) ||
+                       (!isCustomer  &&scope.row.automaticStatus &&
+                      (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
+                     scope.row.type===2))
                   "
                   type="text"
                   @click="toReturnForm(scope.row)"
@@ -470,19 +486,24 @@
                 </el-button>
                 <el-button
                   v-if="
-                    !scope.row.automaticStatus &&
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    scope.row.examineStatus === 'WAIT'
+                    ((!isCustomer &&!scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT')||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT' && scope.row.type!=2)|| ( !isCustomer  &&scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'WAIT' && scope.row.type==2))
                   "
                   type="text"
                   @click="toExamine(scope.row)"
                 >
-                  审
+                  审
                 </el-button>
-                <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
+                <el-button type="text" @click="toDetail(scope.row)"> 详情</el-button>
                 <!--             !scope.row.automaticStatus &&  -->
                 <el-popconfirm
-                  v-if="!scope.row.automaticStatus && scope.row.examineStatus !== 'OK'"
+                  v-if="  $checkBtnRole('del', $route.meta.roles) &&
+                    ((!isCustomer &&!scope.row.automaticStatus &&
+                    scope.row.examineStatus !== 'OK')||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'OK' && scope.row.type!=2) || ( !isCustomer  && scope.row.automaticStatus && scope.row.examineStatus !== 'OK' && scope.row.type==2 ) )"
                   style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.id)"
@@ -578,7 +599,7 @@ export default {
         { label: '已保存', value: 'SAVE' },
         { label: '待审核', value: 'WAIT' },
         { label: '审核通过', value: 'OK' },
-        //  // { label: '审核驳回', value: 'FAIL' },,
+        { label: '审核驳回', value: 'FAIL' },
         { label: '已关闭', value: 'CLOSE' }
       ],
       orderTypeList: [
@@ -602,7 +623,9 @@ export default {
         remark: ''
       },
       isShow: false,
-      categoryList: []
+      categoryList: [],
+      isCustomer: JSON.parse(localStorage.getItem('supply_user')).isCustomer,
+
     }
   },
 
@@ -828,9 +851,10 @@ export default {
         return item.id
       })
       ids = Array.from(new Set(ids))
+
       examineBatchEngin({
         ids: ids.join(','),
-        examineStatus: this.examineForm.status,
+        examineStatus: this.examineForm.status === 'FAIL' ? 'SAVE' : 'OK',
         approvalRemark: this.examineForm.remark
       }).then(res => {
         this.isShowExamineDialog = false
@@ -854,7 +878,7 @@ export default {
      * @param {String} index - 索引值
      * @return Boolean
      */
-    selectable: function (row, index) {
+    selectable: function(row, index) {
       if (row.automaticStatus) {
         return false
       }

+ 26 - 23
src/views/supply/deliver/components/design/preview.vue

@@ -75,35 +75,38 @@ export default {
       }, 500)
     },
     print() {
-      this.hiprintTemplate.print(
-        this.printData,
-        {},
-        {
-          callback: async() => {
-            try {
-              if (typeof this.$parent.addPrint === 'function') {
-                this.$parent.addPrint('addPrints').then(() => {
+
+      try {
+        if (typeof this.$parent.addPrint === 'function') {
+          this.$parent.addPrint('addPrints').then(() => {
+            this.hiprintTemplate.print(
+              this.printData,
+              {},
+              {
+                callback: async() => {
+                  this.hiprintTemplate = {}
+                  this.$parent.tableSelection = []
+                  // setTimeout(() => {
+                  //   console.error('更新发货汇总列表')
+                  //   // this.$successMsg('更新成功')
+                  // }, 1000)
                   setTimeout(() => {
                     console.error('更新发货汇总列表')
                     this.$parent.getList()
                   }, 1000)
-                })
-              } else {
-                throw new Error('加载失败,刷新重试')
+                }
               }
-            } catch (e) {
-              this.$errorMsg(e)
-              // '调用打印次数接口失败'
-            }
-            this.hiprintTemplate = {}
-            this.$parent.tableSelection = []
-            // setTimeout(() => {
-            //   console.error('更新发货汇总列表')
-            //   // this.$successMsg('更新成功')
-            // }, 1000)
-          }
+            )
+
+          })
+        } else {
+          throw new Error('加载失败,刷新重试')
         }
-      )
+      } catch (e) {
+        this.$errorMsg(e)
+        // '调用打印次数接口失败'
+      }
+
       setTimeout(() => {
         this.hideModal()
       }, 2000)

+ 7 - 0
src/views/supply/implement/implement_total_list.vue

@@ -368,6 +368,13 @@
               </template>
             </el-table-column>
             <el-table-column
+              align="right"
+              label="格力折扣"
+              prop="totalDiscAmount"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
               align="left"
               label="表头业务员"
               prop="serviceName"

+ 21 - 21
src/views/supply/pickup/components/design/preview.vue

@@ -68,33 +68,33 @@ export default {
       }, 500)
     },
     print() {
-      this.hiprintTemplate.print(
-        this.printData,
-        {},
-        {
-          callback: async() => {
-            try {
-              if (typeof this.$parent.addPrint === 'function') {
-                this.$parent.addPrint('getDtailPrintDis').then(() => {
+      try {
+        if (typeof this.$parent.addPrint === 'function') {
+          this.$parent.addPrint('getDtailPrintDis').then(() => {
+            this.hiprintTemplate.print(
+              this.printData,
+              {},
+              {
+                callback: async() => {
+                  this.hiprintTemplate = {}
+                  this.$parent.tableSelection = []
+
                   setTimeout(() => {
                     console.error('更新发货汇总列表')
                     this.$parent.getList()
-
                   }, 2000)
-                })
-              } else {
-                throw new Error('加载失败,刷新重试')
+                }
               }
-            } catch (e) {
-              this.$errorMsg(e)
-              // '调用打印次数接口失败'
-            }
-            this.hiprintTemplate = {}
-            this.$parent.tableSelection = []
-
-          }
+            )
+
+          })
+        } else {
+          throw new Error('加载失败,刷新重试')
         }
-      )
+      } catch (e) {
+        this.$errorMsg(e)
+        // '调用打印次数接口失败'
+      }
       setTimeout(() => {
         this.hideModal()
       }, 2000)