Browse Source

no message

linwenxin 2 tháng trước cách đây
mục cha
commit
2836093332

+ 3 - 16
src/packageWorkorder/pages/myNanDu.vue

@@ -116,22 +116,9 @@ export default {
       ]
     },
     toNandufysq(item) {
-      this.$api
-        .post('/workerApply/detail', {
-          orderBaseId: item.orderBaseId
-        })
-        .then(res => {
-          if (res.data?.status == 2 || res.data?.websitStatus == 2) {
-            this.$navToPage({
-              url: `/packageWorkorder/pages/nandufysq?id=${item.orderBaseId}&type=shenhe`
-            })
-          } else {
-            this.$navToPage({
-              url: `/packageWorkorder/pages/nandufysq?id=${item.orderBaseId}&type=view`
-            })
-          }
-        })
-        .catch(res => {})
+      this.$navToPage({
+        url: `/packageWorkorder/pages/nandufysq?id=${item.orderBaseId}`
+      })
     },
 
     async getList() {

+ 24 - 21
src/packageWorkorder/pages/nandufysq.vue

@@ -39,7 +39,7 @@
         >
         <u--textarea
           v-model="remarkVal"
-          :disabled="type == 'view'"
+          :disabled="!isBinji"
           placeholder="请输入备注内容"
           fixed
           border="none"
@@ -59,7 +59,7 @@
         >
         <u--textarea
           v-model="remarkVal2"
-          :disabled="type == 'view'"
+          :disabled="!isBinji"
           placeholder="请输入备注内容"
           fixed
           border="none"
@@ -87,10 +87,10 @@
                 mode="aspectFill"
                 @tap="prevVideo(item.url)"
               ></image>
-              <text v-if="type !== 'view'" class="iconfont icon-guanbi1" @tap="delImage(index)"></text>
+              <text v-if="isBinji" class="iconfont icon-guanbi1" @tap="delImage(index)"></text>
             </view>
           </block>
-          <view class="add" @tap="addImage" v-if="imageList.length < 15 && type !== 'view'">
+          <view class="add" @tap="addImage" v-if="imageList.length < 15 && isBinji">
             <text class="iconfont icon-xiangji"></text>
             <text class="text">添加图片</text>
           </view>
@@ -105,9 +105,7 @@
 
       <view
         class="info-container card mt30"
-        v-if="
-          oldData.workerInvolveApplyItems && oldData.workerInvolveApplyItems.length && ![1, 3].includes(oldData.status)
-        "
+        v-if="oldData && oldData.workerInvolveApplyItems && oldData.workerInvolveApplyItems.length"
       >
         <view class="common-title">
           <text>审核信息</text>
@@ -137,10 +135,10 @@
     </view>
 
     <template slot="footer">
-      <view class="footer-btn-group" v-if="['sub'].includes(type)">
-        <u-button text="确定" type="primary" size="large" @click="submitData"></u-button>
+      <view class="footer-btn-group" v-if="!oldData">
+        <u-button text="提交" type="primary" size="large" @click="submitData"></u-button>
       </view>
-      <view class="footer-btn-group" v-if="['shenhe'].includes(type)">
+      <view class="footer-btn-group" v-if="oldData && oldData.status == 2">
         <u-button text="重新申请" type="primary" size="large" @click="shenheapi"></u-button>
       </view>
     </template>
@@ -178,28 +176,33 @@ export default {
       imageList: [],
       orderDetail: null,
       canClickBtn: true,
-      oldData: {},
+      oldData: null,
       videoUrl: ''
     }
   },
 
+  computed: {
+    isBinji() {
+      return !this.oldData || this.oldData?.status == 2
+    }
+  },
+
   async onLoad({ id, type }) {
     this.id = id
-    this.type = type
     this.getOrderDetail()
-    if (['shenhe', 'view'].includes(this.type)) {
-      this.$api
-        .post('/workerApply/detail', {
-          orderBaseId: this.id
-        })
-        .then(res => {
+    this.$api
+      .post('/workerApply/detail', {
+        orderBaseId: this.id
+      })
+      .then(res => {
+        if (res.data) {
           this.oldData = res.data
           this.remarkVal = res.data.reason
           this.remarkVal2 = res.data.problemDescription
           this.imageList = res.data.image.split(',').map(url => ({ url }))
-        })
-        .catch(res => {})
-    }
+        }
+      })
+      .catch(res => {})
   },
 
   methods: {

+ 7 - 7
src/packageWorkorder/pages/orderDetail.vue

@@ -266,13 +266,13 @@
 
           <template v-if="[3, 42].includes(detail.saleType)">
             <view class="mt30" v-if="!oldData">
-              <u-button plain type="primary" text="申请难度费用" @tap="toNandufysq('sub')"></u-button>
+              <u-button plain type="primary" text="申请难度费用" @tap="toNandufysq()"></u-button>
             </view>
-            <view class="mt30" v-if="oldData && (oldData.status == 2 || oldData.websitStatus == 2)">
-              <u-button plain type="primary" text="重新申请难度费用" @tap="toNandufysq('shenhe')"></u-button>
+            <view class="mt30" v-else-if="oldData.status == 2">
+              <u-button plain type="primary" text="重新申请难度费用" @tap="toNandufysq()"></u-button>
             </view>
-            <view class="mt30" v-else-if="oldData">
-              <u-button plain type="primary" text="难度费用" @tap="toNandufysq('view')"></u-button>
+            <view class="mt30" v-else>
+              <u-button plain type="primary" text="查看难度费用" @tap="toNandufysq()"></u-button>
             </view>
           </template>
 
@@ -1337,9 +1337,9 @@ export default {
       })
     },
 
-    toNandufysq(type) {
+    toNandufysq() {
       this.$navToPage({
-        url: `/packageWorkorder/pages/nandufysq?id=${this.id}&type=${type}`
+        url: `/packageWorkorder/pages/nandufysq?id=${this.id}`
       })
     },