Ver código fonte

退货申请单图片编辑

zhouhao 2 anos atrás
pai
commit
c5134577df

+ 18 - 12
src/views/supply/apply/apply_list.vue

@@ -382,8 +382,9 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('apply', $route.meta.roles) &&
-                    ((  !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'SAVE') || (
+                    (( !isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'SAVE')||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'SAVE' && scope.row.type!=2) || (
                     !isCustomer  &&  scope.row.automaticStatus &&
                      scope.row.examineStatus === 'SAVE' &&
                      scope.row.type===2
@@ -398,8 +399,9 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('apply', $route.meta.roles) &&
-                    ((!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT')||( !isCustomer  && scope.row.automaticStatus &&
+                    ((!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"
@@ -411,8 +413,9 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    ((!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK')||( !isCustomer && scope.row.automaticStatus &&
+                    ((!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"
@@ -436,9 +439,10 @@
                 <el-button
                   v-if="
                     $checkBtnRole('edit', $route.meta.roles) &&
-                      (( !scope.row.automaticStatus &&
+                      ((!isCustomer && !scope.row.automaticStatus &&
                       (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                      scope.row.type === 2) ||
+                      scope.row.type === 2)||(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)
@@ -452,8 +456,9 @@
                 <el-button
                   v-if="
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    ((!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT')|| (!isCustomer && scope.row.automaticStatus &&
+                    ((!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"
@@ -465,8 +470,9 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('del', $route.meta.roles) &&
-                    ((!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' ) ||(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="确定删除吗?"

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

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

+ 7 - 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;
         // })
@@ -778,6 +775,7 @@ export default {
   width: 100%;
   height: 100%;
 }
+
 .main-title {
   display: flex;
   justify-content: space-between;
@@ -786,6 +784,7 @@ export default {
   height: 60px;
   border-bottom: 1px solid #dcdfe6;
   margin-bottom: 20px;
+
   .title {
     font-size: 16px;
     font-weight: 600;

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

@@ -672,8 +672,11 @@ export default {
         this.mainForm.refTradeCategory = data.refTradeCategory
         this.screenForm.warehouse = data.correspondId
         // this.screenForm.refProjectName = data.refProjectName
-        this.fileList = data.salesOrderPictures
-
+        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;
         // })

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

@@ -411,8 +411,9 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('apply', $route.meta.roles) &&
-                    ((!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'SAVE') || (
+                    ((!isCustomer &&!scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'SAVE')||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus === 'SAVE' && scope.row.type!=2)  || (
                      !isCustomer  && scope.row.automaticStatus &&
                      scope.row.examineStatus === 'SAVE' &&
                      scope.row.type===2
@@ -427,8 +428,9 @@
                 <el-popconfirm
                   v-if="
                   $checkBtnRole('apply', $route.meta.roles) &&
-                    ((!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT')||(!isCustomer  && scope.row.automaticStatus &&
+                    ((!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"
@@ -440,8 +442,9 @@
                 <el-popconfirm
                   v-if="
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    ((!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK')||( !isCustomer  && scope.row.automaticStatus &&
+                    ((!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"
@@ -465,9 +468,10 @@
                 <el-button
                   v-if="
                   $checkBtnRole('edit', $route.meta.roles) &&
-                    (( !scope.row.automaticStatus &&
+                    (( !isCustomer &&!scope.row.automaticStatus &&
                       (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                      scope.row.type === 2 ) ||
+                      scope.row.type === 2 )||(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))
@@ -480,8 +484,9 @@
                 <el-button
                   v-if="
                     $checkBtnRole('examine', $route.meta.roles) &&
-                    ((!scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT')|| ( !isCustomer  &&scope.row.automaticStatus &&
+                    ((!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"
@@ -493,8 +498,9 @@
                 <!--             !scope.row.automaticStatus &&  -->
                 <el-popconfirm
                   v-if="  $checkBtnRole('del', $route.meta.roles) &&
-                    ((!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')||(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)"