linwenxin hai 8 meses
pai
achega
874608e4b4

+ 1 - 1
src/common/utils/util.js

@@ -46,7 +46,7 @@ export async function redirection() {
     '/packageWorkorder/pages/orderList',
     '/packageMaterial/pages/stock/index',
     '/packageMaterial/pages/sale/index',
-    '/packageMaterial/pages/sale/index'
+    '/packageMaterial/pages/newSale/index'
   ]
   const goMycon = [
     '/packageMine/pages/collection',

+ 4 - 0
src/main.js

@@ -8,6 +8,10 @@ Vue.config.productionTip = false
 
 import { setStorage, getStorage, removeStorage } from '@/common/utils/storage.js'
 
+window._AMapSecurityConfig = {
+  serviceHost: 'https://jiasm.zfire.top/' + '_AMapService'
+}
+
 // #ifdef H5
 // 解析地址栏参数
 function getQueryVariable(variable) {

+ 0 - 0
src/packageAttachment/pages/applicationParts/index.nvue → src/packageAttachment/pages/applicationParts/index.vue


+ 3 - 3
src/packageAttachment/pages/orderOfSales/card.vue

@@ -4,7 +4,7 @@
       <view class="accessories_nfo_title"> 申请单号: </view>
       <view class="accessories_nfo_info">
         <view>
-          {{ item.salesId }}
+          {{ item.id }}
         </view>
       </view>
       <view class="accessories_nfo_title colorts">
@@ -24,7 +24,7 @@
       <view class="accessories_nfo_info">
         <view>
           {{
-            [...(item.itemList || []).map(a => Math.round(a.salesPrice * a.quantity * 100) / 100), 0].reduce((a, b) => {
+            [...(item.itemList || []).map(a => Math.round(a.salesPrice * a.qty * 100) / 100), 0].reduce((a, b) => {
               return a + b
             })
           }}
@@ -34,7 +34,7 @@
     <view class="accessories_nfo_ac">
       <view class="accessories_nfo_title"> 网点: </view>
       <view class="accessories_nfo_info">
-        <view> {{ item.websitName }}({{ item.websitNumber }}) </view>
+        <view> {{ item.websitName }}({{ item.websitId }}) </view>
       </view>
     </view>
   </view>

+ 5 - 5
src/packageAttachment/pages/orderOfSales/details.vue

@@ -17,7 +17,7 @@
                   <view>
                     {{ item.partsName }}
                   </view>
-                  <view> *{{ item.quantity }} </view>
+                  <view> *{{ item.qty }} </view>
                   <view> ¥{{ item.totalAmount }} </view>
                 </view>
                 <view class="accessories_list_a_number">
@@ -46,7 +46,7 @@
               <view class="accessories_nfo_title"> 申请单号: </view>
               <view class="accessories_nfo_info">
                 <view>
-                  {{ info.salesId }}
+                  {{ info.id }}
                 </view>
               </view>
             </view>
@@ -74,7 +74,7 @@
               <view class="accessories_nfo_title"> 申请类别: </view>
               <view class="accessories_nfo_info">
                 <view>
-                  {{ info.applyCategoryName }}
+                  {{ { HOME: '家用空调', TRADE: '商用空调', ELEC: '生活电器(小家电)' }[info.applyCategoryName] }}
                 </view>
               </view>
             </view>
@@ -98,7 +98,7 @@
               <view class="accessories_nfo_title"> 支付方式: </view>
               <view class="accessories_nfo_info">
                 <view>
-                  {{ ['现金', '微信', '支付宝', '赊账', '通联'][info.payType] }}
+                  {{ { WECHAT: '微信支付', LINE: '线下支付', EXAMINE: '审批' }[info.payType] }}
                 </view>
               </view>
             </view>
@@ -106,7 +106,7 @@
               <view class="accessories_nfo_title"> 支付金额: </view>
               <view class="accessories_nfo_info">
                 <view>
-                  {{ info.totalPrice }}
+                  {{ info.totalAmount }}
                 </view>
               </view>
             </view>

+ 3 - 0
src/packageAttachment/pages/returnOfNewParts/card.vue

@@ -71,6 +71,9 @@ export default {
       return this.item.newRefundManageItemBeanList[0] || {}
     }
   },
+  mounted() {
+    console.log(this.item)
+  },
   methods: {
     toUrl() {
       this.$navToPage({

+ 84 - 58
src/packageMaterial/pages/index.vue

@@ -4,25 +4,33 @@
     :hasFooter="false"
     :isScroll="true"
     :refresherTriggered="refresherTriggered"
-    @refresherrefresh="refresherrefresh">
+    @refresherrefresh="refresherrefresh"
+  >
     <view class="all-container">
       <view class="card">
         <view class="top">
           <text class="iconfont icon-kucun icon"></text>
           <view class="title">辅材/配件库存</view>
-          <view class="right" @tap="navToPage('/packageMaterial/pages/stock/index')">我的库存<text class="iconfont icon-jinru"></text></view>
+          <view class="right" @tap="navToPage('/packageMaterial/pages/stock/index')"
+            >我的库存<text class="iconfont icon-jinru"></text
+          ></view>
         </view>
         <view class="center">
           <view class="text">无辅材/配件库存可以申请购买</view>
-          <u-button type="primary" text="去购买" shape="circle" @click="navToPage(`/packageMaterial/pages/apply/index`)"></u-button>
+          <u-button
+            type="primary"
+            text="去购买"
+            shape="circle"
+            @click="navToPage(`/packageMaterial/pages/apply/index`)"
+          ></u-button>
         </view>
         <view class="bottom">
           <view class="it" @tap="navToPage(`/packageMaterial/pages/stock/returnList?type=NEW`)">
-            <view class="num">{{ count.newRefundCount || 0}}</view>
+            <view class="num">{{ count.newRefundCount || 0 }}</view>
             <view class="text">新件待返还</view>
           </view>
           <view class="it" @tap="navToPage(`/packageMaterial/pages/stock/returnList?type=OLD`)">
-            <view class="num">{{ count.oldRefundCount || 0}}</view>
+            <view class="num">{{ count.oldRefundCount || 0 }}</view>
             <view class="text">旧件待返还</view>
           </view>
         </view>
@@ -31,19 +39,26 @@
         <view class="top">
           <text class="iconfont icon-fucai icon"></text>
           <view class="title">辅材销售</view>
-          <view class="right" @tap="navToPage(`/packageMaterial/pages/sale/orderList?type=M`)">辅材订单<text class="iconfont icon-jinru"></text></view>
+          <view class="right" @tap="navToPage(`/packageMaterial/pages/sale/orderList?type=M`)"
+            >辅材订单<text class="iconfont icon-jinru"></text
+          ></view>
         </view>
         <view class="center">
           <view class="text">用户需要使用辅材,销售收款</view>
-          <u-button type="primary" text="辅材收款" shape="circle" @click="navToPage(`/packageMaterial/pages/sale/index?type=M`)"></u-button>
+          <u-button
+            type="primary"
+            text="辅材收款"
+            shape="circle"
+            @click="navToPage(`/packageMaterial/pages/sale/index?type=M`)"
+          ></u-button>
         </view>
         <view class="bottom">
           <view class="it">
-            <view class="num">{{ count.materialSalesCount || 0}}</view>
+            <view class="num">{{ count.materialSalesCount || 0 }}</view>
             <view class="text">今日下单(单)</view>
           </view>
           <view class="it">
-            <view class="num">{{ count.materialSalesAmount || 0}}</view>
+            <view class="num">{{ count.materialSalesAmount || 0 }}</view>
             <view class="text">今日销售金额</view>
           </view>
         </view>
@@ -52,19 +67,26 @@
         <view class="top">
           <text class="iconfont icon-peijian icon"></text>
           <view class="title">配件销售</view>
-          <view class="right" @tap="navToPage(`/packageMaterial/pages/sale/orderList?type=P`)">配件订单<text class="iconfont icon-jinru"></text></view>
+          <view class="right" @tap="navToPage(`/packageMaterial/pages/newSale/orderList?type=P`)"
+            >配件订单<text class="iconfont icon-jinru"></text
+          ></view>
         </view>
         <view class="center">
           <view class="text">用户需要使用配件,销售收款</view>
-          <u-button type="primary" text="配件收款" shape="circle" @click="navToPage(`/packageMaterial/pages/sale/index?type=P`)"></u-button>
+          <u-button
+            type="primary"
+            text="配件收款"
+            shape="circle"
+            @click="navToPage(`/packageMaterial/pages/newSale/index?type=P`)"
+          ></u-button>
         </view>
         <view class="bottom">
           <view class="it">
-            <view class="num">{{ count.partsSalesCount || 0}}</view>
+            <view class="num">{{ count.partsSalesCount || 0 }}</view>
             <view class="text">今日下单(单)</view>
           </view>
           <view class="it">
-            <view class="num">{{ count.partsSalesAmount || 0}}</view>
+            <view class="num">{{ count.partsSalesAmount || 0 }}</view>
             <view class="text">今日销售金额</view>
           </view>
         </view>
@@ -74,63 +96,66 @@
   <!-- #endif -->
 
   <!-- #ifndef H5 -->
-  <web-view :src="webViewHref(`/packageMaterial/pages/index`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
+  <web-view
+    :src="webViewHref(`/packageMaterial/pages/index`, pam, crossPagePam)"
+    @message="crossPage.$listener"
+  ></web-view>
   <!-- #endif -->
 </template>
 
 <script>
-  // #ifdef H5
-  export default {
-    data() {
-      return {
-        refresherTriggered: false,
-        count: {},
-      }
+// #ifdef H5
+export default {
+  data() {
+    return {
+      refresherTriggered: false,
+      count: {},
+    }
+  },
+
+  onLoad() {
+    this.getDetail();
+  },
+
+  methods: {
+    getDetail() {
+      this.$api.post('/material/worker/stock/my/data/count')
+      .then(res => {
+        this.count = res.data || {};
+      }).finally(res => {
+        this.refresherTriggered = false;
+      })
     },
 
-    onLoad() {
+    // 下拉刷新
+    refresherrefresh() {
+      this.refresherTriggered = true;
       this.getDetail();
     },
 
-    methods: {
-      getDetail() {
-        this.$api.post('/material/worker/stock/my/data/count')
-        .then(res => {
-          this.count = res.data || {};
-        }).finally(res => {
-          this.refresherTriggered = false;
-        })
-      },
+    navToPage(url) {
+      if(!url) return this.$toast('敬请期待~');
 
-      // 下拉刷新
-      refresherrefresh() {
-        this.refresherTriggered = true;
-        this.getDetail();
-      },
-
-      navToPage(url) {
-        if(!url) return this.$toast('敬请期待~');
-
-        this.$navToPage({
-          url
-        })
-      }
-    },
-  }
+      this.$navToPage({
+        url
+      })
+    }
+  },
+}
 
-  // #endif
-  // #ifndef H5
-  export default {
-    data() {
-      return {
-        pam: {},
-      }
-    },
-    onLoad(pam) {
-      this.pam = pam;
+// #endif
+// #ifndef H5
+export default {
+  data() {
+    return {
+      pam: {},
     }
+  },
+  onLoad(pam) {
+    this.pam = pam;
   }
-  // #endif
+}
+// #endif
 </script>
 
 <style lang="scss" scoped>
@@ -140,7 +165,8 @@
     @include zj-card;
     margin-bottom: 20rpx;
     padding: 40rpx 20rpx;
-    &:nth-child(1), &:nth-child(3) {
+    &:nth-child(1),
+    &:nth-child(3) {
       .top {
         .icon {
           background: $assist-color;

+ 12 - 11
src/packageMaterial/pages/newSale/index.vue

@@ -28,7 +28,7 @@
         </view>
       </view>
       <!-- ------------------------------------ -->
-      <view v-for="(item, index) in peijianList" :key="index">
+      <view v-for="(item, index) in rpMaterialOrderItemList" :key="index">
         <u-gap height="10" bgColor="#F7F8FF"></u-gap>
         <view class="item">
           <view class="label" style="font-weight: bold">配件信息{{ index + 1 }}</view>
@@ -92,7 +92,7 @@
       <view class="footer-btn-group">
         <u-button
           text="历史记录"
-          @click="$navToPage({ url: `/packageMaterial/pages/sale/orderList?type=${type}` })"
+          @click="$navToPage({ url: `/packageMaterial/pages/newSale/orderList?type=${type}` })"
         ></u-button>
         <u-button type="primary" text="提交" @click="submitData"></u-button>
       </view>
@@ -141,7 +141,7 @@
 
   <!-- #ifndef H5 -->
   <web-view
-    :src="webViewHref(`/packageMaterial/pages/sale/index`, pam, crossPagePam)"
+    :src="webViewHref(`/packageMaterial/pages/newSale/index`, pam, crossPagePam)"
     @message="crossPage.$listener"
   ></web-view>
   <!-- #endif -->
@@ -175,7 +175,7 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
        websit: null,
        websitList: [],
        isShowWebsitDialog: false,
-       peijianList:[]
+       rpMaterialOrderItemList:[]
      }
    },
 
@@ -216,7 +216,7 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
 
   onShow() {
     var data = this.$getStorage('materialSaleData')
-    if (data.dijiIndex !== undefined && this.peijianList[data.dijiIndex]) {
+    if (data.dijiIndex !== undefined && this.rpMaterialOrderItemList[data.dijiIndex]) {
       console.log(data)
     }
     this.$removeStorage('materialSaleData')
@@ -224,11 +224,11 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
 
   methods: {
     addpeijian() {
-      this.peijianList.push({})
+      this.rpMaterialOrderItemList.push({})
     },
 
     delpeijian(index) {
-      this.peijianList.splice(index, 1)
+      this.rpMaterialOrderItemList.splice(index, 1)
     },
 
      getBrandList() {
@@ -272,13 +272,14 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
       if(!this.websit) return this.$toast('请选择所属网点');
       if(!this.userMobile) return this.$toast('请输入客户电话');
       if(!(/^1[3456789]\d{9}$/.test(this.userMobile)) || this.userMobile.length != 11) return this.$toast('请填写正确的客户电话');
+      console.log(this.websit)
       this.$navToPage({
-        url: `/packageMaterial/pages/sale/product?dijiIndex=${index}&type=${this.type}&categoryId=${this.type=='P'?this.category.categoryId:''}&categoryName=${this.type=='P'?this.category.name:''}&userMobile=${this.userMobile}&orderNo=${this.orderNo}&websitId=${this.websit.websitId}&websitName=${this.websit.name}&wbId=${this.wbId||''}&wbIsAllFee=${this.wbIsAllFee||''}&wbPayType=${this.wbPayType||''}`
+        url: `/packageMaterial/pages/newSale/product?dijiIndex=${index}&type=${this.type}&categoryId=${this.type=='P'?this.category.categoryId:''}&categoryName=${this.type=='P'?this.category.name:''}&userMobile=${this.userMobile}&orderNo=${this.orderNo}&partsWebsitId=${this.websit.partsWebsitId}&websitId=${this.websit.websitId}&websitName=${this.websit.name}&wbId=${this.wbId||''}&wbIsAllFee=${this.wbIsAllFee||''}&wbPayType=${this.wbPayType||''}`
       })
     },
 
     submitData() {
-      if(this.peijianList.length < 1) return this.$toast('请选择');
+      if(this.rpMaterialOrderItemList.length < 1) return this.$toast('请选择');
       this.$setStorage('materialSaleDataZhiFu', {
         type: this.type,
         categoryId: this.type == 'P' ? this.category.categoryId : '',
@@ -293,10 +294,10 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
         wbId: this.wbId,
         wbIsAllFee: this.wbIsAllFee,
         wbPayType: this.wbPayType,
-        goodsList: this.peijianList
+        goodsList: this.rpMaterialOrderItemList
       });
       this.$navToPage({
-        url: `/packageMaterial/pages/sale/order`
+        url: `/packageMaterial/pages/newSale/order`
       })
     },
   },

+ 2 - 2
src/packageMaterial/pages/newSale/order.vue

@@ -63,7 +63,7 @@
 
   <!-- #ifndef H5 -->
   <web-view
-    :src="webViewHref(`/packageMaterial/pages/sale/order`, pam, crossPagePam)"
+    :src="webViewHref(`/packageMaterial/pages/newSale/order`, pam, crossPagePam)"
     @message="crossPage.$listener"
   ></web-view>
   <!-- #endif -->
@@ -202,7 +202,7 @@ export default {
       }).then(res => {
         if(type == 1) {
           this.$navToPage({
-            url: `/packageMaterial/pages/sale/pay?handleOrderId=${res.data}&wbId=${this.wbId}`
+            url: `/packageMaterial/pages/newSale/pay?handleOrderId=${res.data}&wbId=${this.wbId}`
           })
         } else {
           this.$successToast();

+ 102 - 100
src/packageMaterial/pages/newSale/orderDetail.vue

@@ -2,29 +2,28 @@
   <!-- #ifdef H5 -->
   <view class="all-container">
     <view class="bg"></view>
-    <Loading
-    	:type="3"
-    	:loadStatus="loadStatus"
-    	:showText="errorText"
-    />
+    <Loading :type="3" :loadStatus="loadStatus" :showText="errorText" />
     <zj-page-layout
       v-if="detail"
       :hasFooter="true"
       :isScroll="true"
       :refresherTriggered="refresherTriggered"
-      @refresherrefresh="refresherrefresh">
+      @refresherrefresh="refresherrefresh"
+    >
       <view class="content-container">
-        <view class="status-container">{{detail.payStatus | statusFilter}}</view>
+        <view class="status-container">{{ detail.payStatus | statusFilter }}</view>
         <view class="product-container card">
           <view class="title">产品信息</view>
           <view class="product">
             <view class="it" v-for="(item, index) in detail.workerOrderItems" :key="index">
-              <view class="name">{{item.goodsName}}<text>×{{item.num}}{{item.unit}}</text></view>
-              <view class="price">¥{{item.totalAmount | priceFilter}}</view>
+              <view class="name"
+                >{{ item.goodsName }}<text>×{{ item.num }}{{ item.unit }}</text></view
+              >
+              <view class="price">¥{{ item.totalAmount | priceFilter }}</view>
             </view>
             <view class="total">
               <view class="text">合计:</view>
-              <view class="price">¥{{detail.totalAmount | priceFilter}}</view>
+              <view class="price">¥{{ detail.totalAmount | priceFilter }}</view>
             </view>
           </view>
         </view>
@@ -32,41 +31,41 @@
           <view class="title">下单信息</view>
           <view class="row">
             <view class="label">订单单号</view>
-            <view class="value">{{detail.orderId}}</view>
+            <view class="value">{{ detail.orderId }}</view>
             <view class="tag" @tap="$copy(detail.orderId)">复制</view>
           </view>
           <view class="row">
             <view class="label">关联工单</view>
-            <view class="value">{{detail.workerOrderId}}</view>
+            <view class="value">{{ detail.workerOrderId }}</view>
             <view class="tag" @tap="$copy(detail.workerOrderId)">复制</view>
           </view>
           <view class="row">
             <view class="label">客户电话</view>
-            <view class="value">{{detail.userMobile}}</view>
+            <view class="value">{{ detail.userMobile }}</view>
           </view>
           <view class="row">
             <view class="label">销售方式</view>
-            <view class="value">{{detail.settlementType | salesTypeFilter}}</view>
+            <view class="value">{{ detail.settlementType | salesTypeFilter }}</view>
           </view>
           <view class="row">
             <view class="label">所属网点</view>
-            <view class="value">{{detail.websitName}}</view>
+            <view class="value">{{ detail.websitName }}</view>
           </view>
           <view class="row">
             <view class="label">下单人员</view>
-            <view class="value">{{detail.workerName}}</view>
+            <view class="value">{{ detail.workerName }}</view>
           </view>
           <view class="row">
             <view class="label">下单时间</view>
-            <view class="value">{{detail.createTime}}</view>
+            <view class="value">{{ detail.createTime }}</view>
           </view>
           <view class="row">
             <view class="label">支付方式</view>
-            <view class="value">{{detail.payType | payTypeFilter}}</view>
+            <view class="value">{{ detail.payType | payTypeFilter }}</view>
           </view>
           <view class="row">
             <view class="label">备注信息</view>
-            <view class="value">{{detail.remark}}</view>
+            <view class="value">{{ detail.remark }}</view>
           </view>
         </view>
       </view>
@@ -83,103 +82,106 @@
   <!-- #endif -->
 
   <!-- #ifndef H5 -->
-  <web-view :src="webViewHref(`/packageMaterial/pages/sale/orderDetail`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
+  <web-view
+    :src="webViewHref(`/packageMaterial/pages/newSale/orderDetail`, pam, crossPagePam)"
+    @message="crossPage.$listener"
+  ></web-view>
   <!-- #endif -->
 </template>
 
 <script>
-  // #ifdef H5
-  export default {
-    filters: {
-      statusFilter(val) {
-        const MAP = {
-          WAIT: '待支付',
-          PAID: '已支付',
-          CANCEL: '已取消',
-        }
-        return MAP[val];
-      },
-      salesTypeFilter(val) {
-        const MAP = {
-          OWN: '自有出库',
-          OUT: '外购销售',
-        }
-        return MAP[val];
-      },
-      payTypeFilter(val) {
-        const MAP = {
-          WECHAT: '微信支付',
-          LINE: '线下支付',
-        }
-        return MAP[val];
+// #ifdef H5
+export default {
+  filters: {
+    statusFilter(val) {
+      const MAP = {
+        WAIT: '待支付',
+        PAID: '已支付',
+        CANCEL: '已取消',
       }
+      return MAP[val];
     },
-
-    data() {
-      return {
-        id: null,
-        refresherTriggered: false,
-        loadStatus: 0,
-				errorText: '',
-        detail: null,
+    salesTypeFilter(val) {
+      const MAP = {
+        OWN: '自有出库',
+        OUT: '外购销售',
+      }
+      return MAP[val];
+    },
+    payTypeFilter(val) {
+      const MAP = {
+        WECHAT: '微信支付',
+        LINE: '线下支付',
       }
+      return MAP[val];
+    }
+  },
+
+  data() {
+    return {
+      id: null,
+      refresherTriggered: false,
+      loadStatus: 0,
+		errorText: '',
+      detail: null,
+    }
+  },
+
+  onLoad({id}) {
+    this.id = id;
+    this.getDetail();
+  },
+
+  methods: {
+    getDetail() {
+      this.$api.post('/pay/getOrder', {
+        orderId: this.id
+      }).then(res => {
+        this.detail = res.data;
+        this.loadStatus = 0;
+      }).catch(res => {
+    		this.errorText = res.message;
+    		this.loadStatus = 2;
+    	}).finally(res => {
+    		this.refresherTriggered = false;
+    	})
     },
 
-    onLoad({id}) {
-      this.id = id;
+    // 下拉刷新
+    refresherrefresh() {
+      this.refresherTriggered = true;
       this.getDetail();
     },
 
-    methods: {
-      getDetail() {
-        this.$api.post('/pay/getOrder', {
+    // 取消订单
+    cancelOrder() {
+      this.$modal({
+        content: '确认取消订单吗?'
+      }).then(() => {
+        this.$api.post('/pay/cancel', {
           orderId: this.id
         }).then(res => {
-          this.detail = res.data;
-          this.loadStatus = 0;
-        }).catch(res => {
-      		this.errorText = res.message;
-      		this.loadStatus = 2;
-      	}).finally(res => {
-      		this.refresherTriggered = false;
-      	})
-      },
-
-      // 下拉刷新
-      refresherrefresh() {
-        this.refresherTriggered = true;
-        this.getDetail();
-      },
-
-      // 取消订单
-      cancelOrder() {
-        this.$modal({
-          content: '确认取消订单吗?'
-        }).then(() => {
-          this.$api.post('/pay/cancel', {
-            orderId: this.id
-          }).then(res => {
-            this.$successToast();
-            this.getDetail();
-          })
-        }).catch(() => {})
-      }
-    },
-  }
+          this.$successToast();
+          this.getDetail();
+        })
+      }).catch(() => {})
+    }
+  },
+}
 
-  // #endif
-  // #ifndef H5
-  export default {
-    data() {
-      return {
-        pam: {},
-      }
-    },
-    onLoad(pam) {
-      this.pam = pam;
+// #endif
+// #ifndef H5
+export default {
+  data() {
+    return {
+      pam: {},
     }
+  },
+  onLoad(pam) {
+    this.pam = pam;
   }
-  // #endif
+}
+// #endif
 </script>
 
 <style lang="scss" scoped>
@@ -192,7 +194,7 @@
   left: 0;
   width: 100%;
   height: 300rpx;
-  background: linear-gradient(179.48deg, rgba(200,224,251,1) 0.45%,rgba(247,247,247,1) 98.96%);
+  background: linear-gradient(179.48deg, rgba(200, 224, 251, 1) 0.45%, rgba(247, 247, 247, 1) 98.96%);
 }
 .card {
   @include zj-card;

+ 10 - 4
src/packageMaterial/pages/newSale/orderList.vue

@@ -102,7 +102,7 @@
 
   <!-- #ifndef H5 -->
   <web-view
-    :src="webViewHref(`/packageMaterial/pages/sale/orderList`, pam, crossPagePam)"
+    :src="webViewHref(`/packageMaterial/pages/newSale/orderList`, pam, crossPagePam)"
     @message="crossPage.$listener"
   ></web-view>
   <!-- #endif -->
@@ -248,9 +248,15 @@ export default {
     },
 
     toDetail(item) {
-      this.$navToPage({
-        url: `/packageMaterial/pages/sale/orderDetail?id=${item.orderId}`
-      })
+      if (item.goodsTyp == 'M') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/sale/orderDetail?id=${item.orderId}`
+        })
+      } else if (item.goodsTyp == 'P') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/newSale/orderDetail?id=${item.orderId}`
+        })
+      }
     },
 
     // 取消订单

+ 12 - 4
src/packageMaterial/pages/newSale/pay.vue

@@ -178,7 +178,9 @@ export default {
             clearTimeout(this.timeout)
 
             this.$navToPage({
-              url: `/packageMaterial/pages/sale/result?handleOrderId=${this.orderId}&result=1&wbId=${this.wbId || ''}`
+              url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=1&wbId=${
+                this.wbId || ''
+              }`
             })
           }
           // 返回false,轮询3次
@@ -192,7 +194,9 @@ export default {
               this.timeoutNum = 0
               clearTimeout(this.timeout)
               this.$navToPage({
-                url: `/packageMaterial/pages/sale/result?handleOrderId=${this.orderId}&result=0&wbId=${this.wbId || ''}`
+                url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=0&wbId=${
+                  this.wbId || ''
+                }`
               })
             }
           }
@@ -231,11 +235,15 @@ export default {
         .then(res => {
           if (res.data) {
             this.$navToPage({
-              url: `/packageMaterial/pages/sale/result?handleOrderId=${this.orderId}&result=1&wbId=${this.wbId || ''}`
+              url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=1&wbId=${
+                this.wbId || ''
+              }`
             })
           } else {
             this.$navToPage({
-              url: `/packageMaterial/pages/sale/result?handleOrderId=${this.orderId}&result=0&wbId=${this.wbId || ''}`
+              url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=0&wbId=${
+                this.wbId || ''
+              }`
             })
           }
         })

+ 26 - 72
src/packageMaterial/pages/newSale/product.vue

@@ -63,7 +63,7 @@
 
   <!-- #ifndef H5 -->
   <web-view
-    :src="webViewHref(`/packageMaterial/pages/sale/product`, pam, crossPagePam)"
+    :src="webViewHref(`/packageMaterial/pages/newSale/product`, pam, crossPagePam)"
     @message="crossPage.$listener"
   ></web-view>
   <!-- #endif -->
@@ -71,6 +71,7 @@
 
 <script>
 // #ifdef H5
+import { getStorage } from '@/common/utils/storage.js'
 export default {
   data() {
     return {
@@ -92,26 +93,24 @@ export default {
       loadStatus: 0,
       cartList: [],
       selectId: "",
-      dijiIndex: 0
+      dijiIndex: 0,
+      partsWebsitId:"",
     }
   },
 
-  onLoad({dijiIndex, type, userMobile, orderNo, salesType, brandId, brandName, categoryId, categoryName, websitId, websitName, wbId, wbIsAllFee, wbPayType}) {
+  onLoad({partsWebsitId, dijiIndex, type, userMobile, orderNo, salesType, brandId, brandName, categoryId, categoryName, websitId, websitName, wbId, wbIsAllFee, wbPayType}) {
     this.dijiIndex = dijiIndex;
     this.type = type;
     this.userMobile = userMobile;
     this.orderNo = orderNo;
-    // this.salesType = salesType;
-    // this.brandId = brandId;
-    // this.brandName = brandName;
     this.categoryId = categoryId;
     this.categoryName = categoryName;
+    this.partsWebsitId = partsWebsitId;
     this.websitId = websitId;
     this.websitName = websitName;
     this.wbId = wbId;
     this.wbIsAllFee = wbIsAllFee;
     this.wbPayType = wbPayType;
-
     uni.setNavigationBarTitle({
      title: type == 'M' ? '选择辅材' : '选择配件'
     })
@@ -122,6 +121,15 @@ export default {
     }
   },
 
+  computed: {
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+
   methods: {
     // 获取左侧分类
     getLeftList() {
@@ -146,12 +154,12 @@ export default {
           orderId: this.orderNo,
         }
       }else {
-        url = '/pay/websitGoodsList';
+        url = '/app/parts/stock/exist/worker/stock/list';
         params = {
-          categoryName: this.categoryName,
-          brand: this.brandName,
-          orderId: this.orderNo,
-          // normType: 'M'
+          partsAttr: "NEW",
+          identity: this.userInfo.idCard,
+          partsWebsitId: this.partsWebsitId,
+          websitId: this.websitId,
         }
       }
 
@@ -162,7 +170,7 @@ export default {
         ...params
     	}).then(res => {
     		this.loadStatus = 0;
-        let list = res.data.records.map(item => {
+        let list = res.data.map(item => {
           return this.type === 'M' ? {
             goodsId: item.normId,
             goodsName: item.normName,
@@ -173,11 +181,11 @@ export default {
           } : {
             goodsId: item.goodsId,
             goodsName: item.goodsName,
-            goodsCode: item.goodsCode,
-            goodsUnit: item.goodsSalesUnit,
-            goodsAmount: item.normAmount,
-            normType: item.normType,
-            num: 0
+            goodsCode: item.goodsId,
+            goodsUnit: item.goodsStockUnit,
+            goodsAmount: item.marketPrice,
+            normType: "M",
+            num: 1
           }
         });
         for(let i = 0; i < list.length; i++) {
@@ -207,61 +215,7 @@ export default {
       this.getRightList();
     },
 
-    changeNum(e) {
-      let obj = this.rightList.find((item) => item.goodsId === e.name);
-      if(e.unit && e.unit != '米') {
-        e.value = Math.floor(e.value);
-        obj.num = Math.floor(obj.num);
-      }
-      // 判断对象数组中是否存在该对象
-      let index = this.cartList.findIndex((item) => item.goodsId === obj.goodsId);
-      // 如果是0,就删除
-      if(index !== -1 && e.value == 0) {
-        this.cartList.splice(index, 1);
-      }
-      // 如果有就替换,没有就添加
-      else if (index !== -1) {
-      	this.cartList.splice(index, 1, obj);
-      }
-      else {
-        if(e.value > 0) {
-          this.cartList.push(obj);
-        }
-      }
-    },
-
-    changeCartNum(e) {
-      let obj = this.cartList.find((item) => item.goodsId === e.name);
-      if(e.unit && e.unit != '米') {
-        e.value = Math.floor(e.value);
-        obj.num = Math.floor(obj.num);
-      }
-      let index = this.cartList.findIndex((item) => item.goodsId === obj.goodsId);
-      this.cartList.splice(index, 1, obj);
-
-      this.getRightList();
-    },
-
-    overlimitFun(index) {
-      this.$modal({
-        content: '把该产品从购物车移除?'
-      }).then(() => {
-        this.cartList.splice(index, 1);
-        this.getRightList();
-      }).catch(() => {})
-    },
-
-    clearCart() {
-      this.$modal({
-        content: '确定清空购物车?'
-      }).then(() => {
-        this.cartList = [];
-        this.getRightList();
-      }).catch(() => {})
-    },
-
     submitData() {
-
       var data = this.rightList.find(item => item.goodsCode == this.selectId)
       if (data) {
         this.$setStorage('materialSaleData', {...data, dijiIndex: this.dijiIndex});

+ 78 - 91
src/packageMaterial/pages/newSale/result.vue

@@ -1,11 +1,7 @@
 <template>
   <!-- #ifdef H5 -->
   <view>
-    <Loading
-      :type="3"
-    	:loadStatus="loadStatus"
-    	:showText="errorText"
-    />
+    <Loading :type="3" :loadStatus="loadStatus" :showText="errorText" />
 
     <zj-page-layout v-if="detail" :hasFooter="true">
       <view style="padding: 1rpx 30rpx">
@@ -17,7 +13,7 @@
           <view class="title" v-if="result === 1">支付成功</view>
           <view class="title" v-if="result === 0">支付失败</view>
           <view class="price"
-            >¥<text>{{detail.totalAmount | priceFilter}}</text></view
+            >¥<text>{{ detail.totalAmount | priceFilter }}</text></view
           >
         </view>
 
@@ -49,20 +45,8 @@
 
       <template slot="footer">
         <view class="footer-btn-group">
-          <u-button
-            text="返回订单"
-            type="primary"
-            size="large"
-            @click="toOrderDetail"
-            v-if="result === 1"
-          ></u-button>
-          <u-button
-            text="重新扫码"
-            type="primary"
-            size="large"
-            @click="backPage"
-            v-if="result === 0"
-          ></u-button>
+          <u-button text="返回订单" type="primary" size="large" @click="toOrderDetail" v-if="result === 1"></u-button>
+          <u-button text="重新扫码" type="primary" size="large" @click="backPage" v-if="result === 0"></u-button>
         </view>
       </template>
     </zj-page-layout>
@@ -70,90 +54,93 @@
   <!-- #endif -->
 
   <!-- #ifndef H5 -->
-  <web-view :src="webViewHref(`/packageMaterial/pages/sale/result`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
+  <web-view
+    :src="webViewHref(`/packageMaterial/pages/newSale/result`, pam, crossPagePam)"
+    @message="crossPage.$listener"
+  ></web-view>
   <!-- #endif -->
 </template>
 
 <script>
-  // #ifdef H5
-  export default {
-    filters: {
-      payTypeFilter(val) {
-        const MAP = {
-          WECHAT: '微信支付',
-          LINE: '线下支付',
-        }
-        return MAP[val];
+// #ifdef H5
+export default {
+  filters: {
+    payTypeFilter(val) {
+      const MAP = {
+        WECHAT: '微信支付',
+        LINE: '线下支付',
       }
-    },
-
-    data() {
-      return {
-        orderId: null,
-        wbId: null,
-        refresherTriggered: false,
-        loadStatus: 0,
-        errorText: '',
-        detail: null,
-        result: 0
-      };
-    },
-
-    onLoad({ handleOrderId, result, wbId }) {
-      this.orderId = handleOrderId;
-      this.result = Number(result);
-      this.wbId = wbId;
-      this.getDetail();
-    },
+      return MAP[val];
+    }
+  },
 
-    methods: {
-      getDetail() {
-        let url = '', params = {};
-        if(this.wbId) {
-          url = '/engin/material/detail';
-          params.id = this.orderId;
-        }else {
-          url = '/pay/getOrder';
-          params.orderId = this.orderId;
-        }
-        this.$api.post(url, params).then(res => {
-          this.detail = res.data;
-          this.loadStatus = 0;
-        }).catch(res => {
-          this.errorText = res.message;
-          this.loadStatus = 2;
-        }).finally(res => {
-          this.refresherTriggered = false;
-        })
-      },
+  data() {
+    return {
+      orderId: null,
+      wbId: null,
+      refresherTriggered: false,
+      loadStatus: 0,
+      errorText: '',
+      detail: null,
+      result: 0
+    };
+  },
 
-      toOrderDetail() {
-        this.$navToPage({
-          url: `/packageMaterial/pages/index`,
-        }, 'reLaunch');
-      },
+  onLoad({ handleOrderId, result, wbId }) {
+    this.orderId = handleOrderId;
+    this.result = Number(result);
+    this.wbId = wbId;
+    this.getDetail();
+  },
 
-      backPage() {
-        this.crossPage.$emit('reScanCode', '');
-        this.$navToPage({
-          delta: 1
-        }, 'navigateBack')
+  methods: {
+    getDetail() {
+      let url = '', params = {};
+      if(this.wbId) {
+        url = '/engin/material/detail';
+        params.id = this.orderId;
+      }else {
+        url = '/pay/getOrder';
+        params.orderId = this.orderId;
       }
+      this.$api.post(url, params).then(res => {
+        this.detail = res.data;
+        this.loadStatus = 0;
+      }).catch(res => {
+        this.errorText = res.message;
+        this.loadStatus = 2;
+      }).finally(res => {
+        this.refresherTriggered = false;
+      })
     },
-  };
-  // #endif
-  // #ifndef H5
-  export default {
-    data() {
-      return {
-        pam: {},
-      }
+
+    toOrderDetail() {
+      this.$navToPage({
+        url: `/packageMaterial/pages/index`,
+      }, 'reLaunch');
     },
-    onLoad(pam) {
-      this.pam = pam;
+
+    backPage() {
+      this.crossPage.$emit('reScanCode', '');
+      this.$navToPage({
+        delta: 1
+      }, 'navigateBack')
     }
+  },
+};
+// #endif
+// #ifndef H5
+export default {
+  data() {
+    return {
+      pam: {},
+    }
+  },
+  onLoad(pam) {
+    this.pam = pam;
   }
-  // #endif
+}
+// #endif
 </script>
 
 <style lang="scss" scoped>

+ 1 - 7
src/packageMaterial/pages/sale/index.vue

@@ -29,13 +29,7 @@
       <view class="item">
         <view class="label"><text>*</text>客户电话</view>
         <!-- :readonly="hasOid" -->
-        <u--input
-          :maxlength="11"
-          placeholder="请输入"
-          border="none"
-          inputAlign="right"
-          v-model="userMobile"
-        ></u--input>
+        <u--input :maxlength="11" placeholder="请输入" border="none" inputAlign="right" v-model="userMobile"></u--input>
       </view>
       <view class="item">
         <view class="label">工单单号</view>

+ 102 - 100
src/packageMaterial/pages/sale/orderDetail.vue

@@ -2,29 +2,28 @@
   <!-- #ifdef H5 -->
   <view class="all-container">
     <view class="bg"></view>
-    <Loading
-    	:type="3"
-    	:loadStatus="loadStatus"
-    	:showText="errorText"
-    />
+    <Loading :type="3" :loadStatus="loadStatus" :showText="errorText" />
     <zj-page-layout
       v-if="detail"
       :hasFooter="true"
       :isScroll="true"
       :refresherTriggered="refresherTriggered"
-      @refresherrefresh="refresherrefresh">
+      @refresherrefresh="refresherrefresh"
+    >
       <view class="content-container">
-        <view class="status-container">{{detail.payStatus | statusFilter}}</view>
+        <view class="status-container">{{ detail.payStatus | statusFilter }}</view>
         <view class="product-container card">
           <view class="title">产品信息</view>
           <view class="product">
             <view class="it" v-for="(item, index) in detail.workerOrderItems" :key="index">
-              <view class="name">{{item.goodsName}}<text>×{{item.num}}{{item.unit}}</text></view>
-              <view class="price">¥{{item.totalAmount | priceFilter}}</view>
+              <view class="name"
+                >{{ item.goodsName }}<text>×{{ item.num }}{{ item.unit }}</text></view
+              >
+              <view class="price">¥{{ item.totalAmount | priceFilter }}</view>
             </view>
             <view class="total">
               <view class="text">合计:</view>
-              <view class="price">¥{{detail.totalAmount | priceFilter}}</view>
+              <view class="price">¥{{ detail.totalAmount | priceFilter }}</view>
             </view>
           </view>
         </view>
@@ -32,41 +31,41 @@
           <view class="title">下单信息</view>
           <view class="row">
             <view class="label">订单单号</view>
-            <view class="value">{{detail.orderId}}</view>
+            <view class="value">{{ detail.orderId }}</view>
             <view class="tag" @tap="$copy(detail.orderId)">复制</view>
           </view>
           <view class="row">
             <view class="label">关联工单</view>
-            <view class="value">{{detail.workerOrderId}}</view>
+            <view class="value">{{ detail.workerOrderId }}</view>
             <view class="tag" @tap="$copy(detail.workerOrderId)">复制</view>
           </view>
           <view class="row">
             <view class="label">客户电话</view>
-            <view class="value">{{detail.userMobile}}</view>
+            <view class="value">{{ detail.userMobile }}</view>
           </view>
           <view class="row">
             <view class="label">销售方式</view>
-            <view class="value">{{detail.settlementType | salesTypeFilter}}</view>
+            <view class="value">{{ detail.settlementType | salesTypeFilter }}</view>
           </view>
           <view class="row">
             <view class="label">所属网点</view>
-            <view class="value">{{detail.websitName}}</view>
+            <view class="value">{{ detail.websitName }}</view>
           </view>
           <view class="row">
             <view class="label">下单人员</view>
-            <view class="value">{{detail.workerName}}</view>
+            <view class="value">{{ detail.workerName }}</view>
           </view>
           <view class="row">
             <view class="label">下单时间</view>
-            <view class="value">{{detail.createTime}}</view>
+            <view class="value">{{ detail.createTime }}</view>
           </view>
           <view class="row">
             <view class="label">支付方式</view>
-            <view class="value">{{detail.payType | payTypeFilter}}</view>
+            <view class="value">{{ detail.payType | payTypeFilter }}</view>
           </view>
           <view class="row">
             <view class="label">备注信息</view>
-            <view class="value">{{detail.remark}}</view>
+            <view class="value">{{ detail.remark }}</view>
           </view>
         </view>
       </view>
@@ -83,103 +82,106 @@
   <!-- #endif -->
 
   <!-- #ifndef H5 -->
-  <web-view :src="webViewHref(`/packageMaterial/pages/sale/orderDetail`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
+  <web-view
+    :src="webViewHref(`/packageMaterial/pages/sale/orderDetail`, pam, crossPagePam)"
+    @message="crossPage.$listener"
+  ></web-view>
   <!-- #endif -->
 </template>
 
 <script>
-  // #ifdef H5
-  export default {
-    filters: {
-      statusFilter(val) {
-        const MAP = {
-          WAIT: '待支付',
-          PAID: '已支付',
-          CANCEL: '已取消',
-        }
-        return MAP[val];
-      },
-      salesTypeFilter(val) {
-        const MAP = {
-          OWN: '自有出库',
-          OUT: '外购销售',
-        }
-        return MAP[val];
-      },
-      payTypeFilter(val) {
-        const MAP = {
-          WECHAT: '微信支付',
-          LINE: '线下支付',
-        }
-        return MAP[val];
+// #ifdef H5
+export default {
+  filters: {
+    statusFilter(val) {
+      const MAP = {
+        WAIT: '待支付',
+        PAID: '已支付',
+        CANCEL: '已取消',
       }
+      return MAP[val];
     },
-
-    data() {
-      return {
-        id: null,
-        refresherTriggered: false,
-        loadStatus: 0,
-				errorText: '',
-        detail: null,
+    salesTypeFilter(val) {
+      const MAP = {
+        OWN: '自有出库',
+        OUT: '外购销售',
+      }
+      return MAP[val];
+    },
+    payTypeFilter(val) {
+      const MAP = {
+        WECHAT: '微信支付',
+        LINE: '线下支付',
       }
+      return MAP[val];
+    }
+  },
+
+  data() {
+    return {
+      id: null,
+      refresherTriggered: false,
+      loadStatus: 0,
+		errorText: '',
+      detail: null,
+    }
+  },
+
+  onLoad({id}) {
+    this.id = id;
+    this.getDetail();
+  },
+
+  methods: {
+    getDetail() {
+      this.$api.post('/pay/getOrder', {
+        orderId: this.id
+      }).then(res => {
+        this.detail = res.data;
+        this.loadStatus = 0;
+      }).catch(res => {
+    		this.errorText = res.message;
+    		this.loadStatus = 2;
+    	}).finally(res => {
+    		this.refresherTriggered = false;
+    	})
     },
 
-    onLoad({id}) {
-      this.id = id;
+    // 下拉刷新
+    refresherrefresh() {
+      this.refresherTriggered = true;
       this.getDetail();
     },
 
-    methods: {
-      getDetail() {
-        this.$api.post('/pay/getOrder', {
+    // 取消订单
+    cancelOrder() {
+      this.$modal({
+        content: '确认取消订单吗?'
+      }).then(() => {
+        this.$api.post('/pay/cancel', {
           orderId: this.id
         }).then(res => {
-          this.detail = res.data;
-          this.loadStatus = 0;
-        }).catch(res => {
-      		this.errorText = res.message;
-      		this.loadStatus = 2;
-      	}).finally(res => {
-      		this.refresherTriggered = false;
-      	})
-      },
-
-      // 下拉刷新
-      refresherrefresh() {
-        this.refresherTriggered = true;
-        this.getDetail();
-      },
-
-      // 取消订单
-      cancelOrder() {
-        this.$modal({
-          content: '确认取消订单吗?'
-        }).then(() => {
-          this.$api.post('/pay/cancel', {
-            orderId: this.id
-          }).then(res => {
-            this.$successToast();
-            this.getDetail();
-          })
-        }).catch(() => {})
-      }
-    },
-  }
+          this.$successToast();
+          this.getDetail();
+        })
+      }).catch(() => {})
+    }
+  },
+}
 
-  // #endif
-  // #ifndef H5
-  export default {
-    data() {
-      return {
-        pam: {},
-      }
-    },
-    onLoad(pam) {
-      this.pam = pam;
+// #endif
+// #ifndef H5
+export default {
+  data() {
+    return {
+      pam: {},
     }
+  },
+  onLoad(pam) {
+    this.pam = pam;
   }
-  // #endif
+}
+// #endif
 </script>
 
 <style lang="scss" scoped>
@@ -192,7 +194,7 @@
   left: 0;
   width: 100%;
   height: 300rpx;
-  background: linear-gradient(179.48deg, rgba(200,224,251,1) 0.45%,rgba(247,247,247,1) 98.96%);
+  background: linear-gradient(179.48deg, rgba(200, 224, 251, 1) 0.45%, rgba(247, 247, 247, 1) 98.96%);
 }
 .card {
   @include zj-card;

+ 9 - 3
src/packageMaterial/pages/sale/orderList.vue

@@ -248,9 +248,15 @@ export default {
     },
 
     toDetail(item) {
-      this.$navToPage({
-        url: `/packageMaterial/pages/sale/orderDetail?id=${item.orderId}`
-      })
+      if (item.goodsTyp == 'M') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/sale/orderDetail?id=${item.orderId}`
+        })
+      } else if (item.goodsTyp == 'P') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/newSale/orderDetail?id=${item.orderId}`
+        })
+      }
     },
 
     // 取消订单

+ 78 - 91
src/packageMaterial/pages/sale/result.vue

@@ -1,11 +1,7 @@
 <template>
   <!-- #ifdef H5 -->
   <view>
-    <Loading
-      :type="3"
-    	:loadStatus="loadStatus"
-    	:showText="errorText"
-    />
+    <Loading :type="3" :loadStatus="loadStatus" :showText="errorText" />
 
     <zj-page-layout v-if="detail" :hasFooter="true">
       <view style="padding: 1rpx 30rpx">
@@ -17,7 +13,7 @@
           <view class="title" v-if="result === 1">支付成功</view>
           <view class="title" v-if="result === 0">支付失败</view>
           <view class="price"
-            >¥<text>{{detail.totalAmount | priceFilter}}</text></view
+            >¥<text>{{ detail.totalAmount | priceFilter }}</text></view
           >
         </view>
 
@@ -49,20 +45,8 @@
 
       <template slot="footer">
         <view class="footer-btn-group">
-          <u-button
-            text="返回订单"
-            type="primary"
-            size="large"
-            @click="toOrderDetail"
-            v-if="result === 1"
-          ></u-button>
-          <u-button
-            text="重新扫码"
-            type="primary"
-            size="large"
-            @click="backPage"
-            v-if="result === 0"
-          ></u-button>
+          <u-button text="返回订单" type="primary" size="large" @click="toOrderDetail" v-if="result === 1"></u-button>
+          <u-button text="重新扫码" type="primary" size="large" @click="backPage" v-if="result === 0"></u-button>
         </view>
       </template>
     </zj-page-layout>
@@ -70,90 +54,93 @@
   <!-- #endif -->
 
   <!-- #ifndef H5 -->
-  <web-view :src="webViewHref(`/packageMaterial/pages/sale/result`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
+  <web-view
+    :src="webViewHref(`/packageMaterial/pages/sale/result`, pam, crossPagePam)"
+    @message="crossPage.$listener"
+  ></web-view>
   <!-- #endif -->
 </template>
 
 <script>
-  // #ifdef H5
-  export default {
-    filters: {
-      payTypeFilter(val) {
-        const MAP = {
-          WECHAT: '微信支付',
-          LINE: '线下支付',
-        }
-        return MAP[val];
+// #ifdef H5
+export default {
+  filters: {
+    payTypeFilter(val) {
+      const MAP = {
+        WECHAT: '微信支付',
+        LINE: '线下支付',
       }
-    },
-
-    data() {
-      return {
-        orderId: null,
-        wbId: null,
-        refresherTriggered: false,
-        loadStatus: 0,
-        errorText: '',
-        detail: null,
-        result: 0
-      };
-    },
-
-    onLoad({ handleOrderId, result, wbId }) {
-      this.orderId = handleOrderId;
-      this.result = Number(result);
-      this.wbId = wbId;
-      this.getDetail();
-    },
+      return MAP[val];
+    }
+  },
 
-    methods: {
-      getDetail() {
-        let url = '', params = {};
-        if(this.wbId) {
-          url = '/engin/material/detail';
-          params.id = this.orderId;
-        }else {
-          url = '/pay/getOrder';
-          params.orderId = this.orderId;
-        }
-        this.$api.post(url, params).then(res => {
-          this.detail = res.data;
-          this.loadStatus = 0;
-        }).catch(res => {
-          this.errorText = res.message;
-          this.loadStatus = 2;
-        }).finally(res => {
-          this.refresherTriggered = false;
-        })
-      },
+  data() {
+    return {
+      orderId: null,
+      wbId: null,
+      refresherTriggered: false,
+      loadStatus: 0,
+      errorText: '',
+      detail: null,
+      result: 0
+    };
+  },
 
-      toOrderDetail() {
-        this.$navToPage({
-          url: `/packageMaterial/pages/index`,
-        }, 'reLaunch');
-      },
+  onLoad({ handleOrderId, result, wbId }) {
+    this.orderId = handleOrderId;
+    this.result = Number(result);
+    this.wbId = wbId;
+    this.getDetail();
+  },
 
-      backPage() {
-        this.crossPage.$emit('reScanCode', '');
-        this.$navToPage({
-          delta: 1
-        }, 'navigateBack')
+  methods: {
+    getDetail() {
+      let url = '', params = {};
+      if(this.wbId) {
+        url = '/engin/material/detail';
+        params.id = this.orderId;
+      }else {
+        url = '/pay/getOrder';
+        params.orderId = this.orderId;
       }
+      this.$api.post(url, params).then(res => {
+        this.detail = res.data;
+        this.loadStatus = 0;
+      }).catch(res => {
+        this.errorText = res.message;
+        this.loadStatus = 2;
+      }).finally(res => {
+        this.refresherTriggered = false;
+      })
     },
-  };
-  // #endif
-  // #ifndef H5
-  export default {
-    data() {
-      return {
-        pam: {},
-      }
+
+    toOrderDetail() {
+      this.$navToPage({
+        url: `/packageMaterial/pages/index`,
+      }, 'reLaunch');
     },
-    onLoad(pam) {
-      this.pam = pam;
+
+    backPage() {
+      this.crossPage.$emit('reScanCode', '');
+      this.$navToPage({
+        delta: 1
+      }, 'navigateBack')
     }
+  },
+};
+// #endif
+// #ifndef H5
+export default {
+  data() {
+    return {
+      pam: {},
+    }
+  },
+  onLoad(pam) {
+    this.pam = pam;
   }
-  // #endif
+}
+// #endif
 </script>
 
 <style lang="scss" scoped>

+ 10 - 4
src/packageMine/pages/salesProfit/index.vue

@@ -186,10 +186,16 @@ export default {
     },
 
     toDetail(item) {
-       this.$navToPage({
-         url: `/packageMaterial/pages/sale/orderDetail?id=${item.orderId}`
-       })
-     },
+      if (item.goodsTyp == 'M') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/sale/orderDetail?id=${item.orderId}`
+        })
+      } else if (item.goodsTyp == 'P') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/newSale/orderDetail?id=${item.orderId}`
+        })
+      }
+    },
   },
 }
 

+ 10 - 4
src/packageMine/pages/salesProfit/orderList.vue

@@ -195,10 +195,16 @@ import zjDialogDateRangePicker from '@/components/zj-dialog/zj-dialog-dateRangeP
      },
 
      toDetail(item) {
-       this.$navToPage({
-         url: `/packageMaterial/pages/sale/orderDetail?id=${item.orderId}`
-       })
-     },
+      if (item.goodsTyp == 'M') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/sale/orderDetail?id=${item.orderId}`
+        })
+      } else if (item.goodsTyp == 'P') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/newSale/orderDetail?id=${item.orderId}`
+        })
+      }
+    },
    },
  }
 

+ 112 - 112
src/packageMine/pages/salesProfit/withdraw/orderList.vue

@@ -5,13 +5,14 @@
       :isScroll="true"
       :refresherTriggered="refresherTriggered"
       @refresherrefresh="refresherrefresh"
-      @scrolltolower="scrolltolower">
+      @scrolltolower="scrolltolower"
+    >
       <view class="list-container">
         <view class="item" v-for="(item, index) in dataList" :key="index">
           <view class="row">
             <view class="label">订单单号</view>
-            <view class="value">{{item.orderId}}</view>
-            <view class="status blue">{{item.status | statusFilter}}</view>
+            <view class="value">{{ item.orderId }}</view>
+            <view class="status blue">{{ item.status | statusFilter }}</view>
           </view>
           <!-- <view class="row">
             <view class="label">所属网点</view>
@@ -19,141 +20,140 @@
           </view> -->
           <view class="row">
             <view class="label">师傅电话</view>
-            <view class="value">{{item.workerMobile}}</view>
+            <view class="value">{{ item.workerMobile }}</view>
           </view>
           <view class="row">
             <view class="label">订单金额</view>
-            <view class="value">¥{{item.totalPrice | priceFilter}}</view>
+            <view class="value">¥{{ item.totalPrice | priceFilter }}</view>
           </view>
           <view class="row">
             <view class="label">销售利润</view>
-            <view class="value" :class="item.workerAmount > 0 ? 'blue':'orange'">¥{{item.workerAmount | priceFilter}}</view>
-            <view class="status" :class="item.workerAmount > 0 ? 'blue':'orange'">{{item.workerAmount > 0 ? '销售':'退款'}}</view>
+            <view class="value" :class="item.workerAmount > 0 ? 'blue' : 'orange'"
+              >¥{{ item.workerAmount | priceFilter }}</view
+            >
+            <view class="status" :class="item.workerAmount > 0 ? 'blue' : 'orange'">{{
+              item.workerAmount > 0 ? '销售' : '退款'
+            }}</view>
           </view>
         </view>
       </view>
       <Loading :loadStatus="loadStatus" :dataList="dataList" />
-
     </zj-page-layout>
-
   </view>
   <!-- #endif -->
 
   <!-- #ifndef H5 -->
-  <web-view :src="webViewHref(`/packageMine/pages/salesProfit/withdraw/orderList`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
+  <web-view
+    :src="webViewHref(`/packageMine/pages/salesProfit/withdraw/orderList`, pam, crossPagePam)"
+    @message="crossPage.$listener"
+  ></web-view>
   <!-- #endif -->
 </template>
 
 <script>
-  // #ifdef H5
-	import zjDialogDateRangePicker from '@/components/zj-dialog/zj-dialog-dateRangePicker.vue';
-
-  export default {
-		components: {
-			zjDialogDateRangePicker,
-		},
-
-    filters: {
-      statusFilter(val) {
-        const MAP = {
-          WAIT: '待结算',
-          WAIT_ING: '可提现',
-          ING: '提现中',
-          OVER: '已到账',
-        }
-        return MAP[val];
-      },
-    },
-
-    data() {
-      return {
-        id: null,
-				dataList: [],
-				pageNum: 1,
-				loadStatus: 0,
-        refresherTriggered: false,
-        isShowDatePicker: false,
-        startDate: '',
-        endDate: '',
-      }
-    },
-
-    onLoad({id}) {
-      this.id = id;
-      this.getList();
-    },
-
-    methods: {
-      getList() {
-      	this.loadStatus = 1;
-      	this.$api.post('/withdrawal/list/detail', {
-      	  pageNum: this.pageNum,
-      	  pageSize: 10,
-          id: this.id,
-      	}).then(res => {
-      		this.loadStatus = 0;
-      		let list = res.data.records;
-      		if (list.length < 10) {
-      		  this.loadStatus = 2;
-      		}
-      		this.dataList = this.dataList.concat(list);
-      	}).catch(() => {
-      	  this.loadStatus = 2;
-      	}).finally(res => {
-      	  this.refresherTriggered = false;
-      	})
-      },
-
-      refreshList() {
-      	this.dataList = [];
-      	this.pageNum = 1;
-      	this.getList();
-      },
-
-      // 滚动到底部
-      scrolltolower(e) {
-      	if (this.loadStatus === 0) {
-      		this.pageNum++;
-      		this.getList();
-      	}
-      },
-
-      // 触发下拉刷新
-      refresherrefresh(e) {
-      	this.refresherTriggered = true;
-      	this.refreshList();
-      },
-
-      toDetail(item) {
-        this.$navToPage({
-          url: `/packageMaterial/pages/sale/orderDetail?id=${item.orderId}`
-        })
-      },
-    },
-  }
-
-  // #endif
-  // #ifndef H5
-  export default {
-    data() {
-      return {
-        pam: {},
-      }
-    },
-    onLoad(pam) {
-      this.pam = pam;
-    }
-  }
-  // #endif
+ // #ifdef H5
+import zjDialogDateRangePicker from '@/components/zj-dialog/zj-dialog-dateRangePicker.vue';
+
+ export default {
+	components: {
+		zjDialogDateRangePicker,
+	},
+
+   filters: {
+     statusFilter(val) {
+       const MAP = {
+         WAIT: '待结算',
+         WAIT_ING: '可提现',
+         ING: '提现中',
+         OVER: '已到账',
+       }
+       return MAP[val];
+     },
+   },
+
+   data() {
+     return {
+       id: null,
+			dataList: [],
+			pageNum: 1,
+			loadStatus: 0,
+       refresherTriggered: false,
+       isShowDatePicker: false,
+       startDate: '',
+       endDate: '',
+     }
+   },
+
+   onLoad({id}) {
+     this.id = id;
+     this.getList();
+   },
+
+   methods: {
+     getList() {
+     	this.loadStatus = 1;
+     	this.$api.post('/withdrawal/list/detail', {
+     	  pageNum: this.pageNum,
+     	  pageSize: 10,
+         id: this.id,
+     	}).then(res => {
+     		this.loadStatus = 0;
+     		let list = res.data.records;
+     		if (list.length < 10) {
+     		  this.loadStatus = 2;
+     		}
+     		this.dataList = this.dataList.concat(list);
+     	}).catch(() => {
+     	  this.loadStatus = 2;
+     	}).finally(res => {
+     	  this.refresherTriggered = false;
+     	})
+     },
+
+     refreshList() {
+     	this.dataList = [];
+     	this.pageNum = 1;
+     	this.getList();
+     },
+
+     // 滚动到底部
+     scrolltolower(e) {
+     	if (this.loadStatus === 0) {
+     		this.pageNum++;
+     		this.getList();
+     	}
+     },
+
+     // 触发下拉刷新
+     refresherrefresh(e) {
+     	this.refresherTriggered = true;
+     	this.refreshList();
+     },
+   },
+ }
+
+ // #endif
+ // #ifndef H5
+ export default {
+   data() {
+     return {
+       pam: {},
+     }
+   },
+   onLoad(pam) {
+     this.pam = pam;
+   }
+ }
+ // #endif
 </script>
 
 <style lang="scss" scoped>
 .tab-container {
-  background: #FFFFFF;
+  background: #ffffff;
 }
 
 .date-container {
-  background: #FFFFFF;
+  background: #ffffff;
   padding: 0 20rpx;
   .box {
     padding-left: 20rpx;

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 443 - 282
src/packageWorkorder/pages/orderDetail.vue


+ 290 - 208
src/packageWorkorder/pages/orderList.vue

@@ -1,14 +1,23 @@
 <template>
   <view>
-    <zj-page-layout :hasFooter="false" :isScroll="true" :refresherTriggered="refresherTriggered"
-      @refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower">
+    <zj-page-layout
+      :hasFooter="false"
+      :isScroll="true"
+      :refresherTriggered="refresherTriggered"
+      @refresherrefresh="refresherrefresh"
+      @scrolltolower="scrolltolower"
+    >
       <template slot="header">
         <view class="top-container">
           <scroll-view class="tab-scroll-view" scroll-x scroll-with-animation :scroll-left="scrollLeft">
             <view class="left-nav">
-              <view class="item" v-for="(item, index) in mainTabs" :key="index"
+              <view
+                class="item"
+                v-for="(item, index) in mainTabs"
+                :key="index"
                 :class="[curMainTab === item.value ? 'active' : '', 'tab-item-' + index]"
-                @tap="changeMainTab(item.value)">
+                @tap="changeMainTab(item.value)"
+              >
                 <view class="name">{{ item.name }}</view>
                 <view class="num">{{ item.num || '' }}</view>
               </view>
@@ -23,10 +32,16 @@
 
       <view>
         <view class="status-container">
-          <u-tabs :list="smallTabs" @change="changeSmallTab" :current="curSmallTabIndex" lineWidth="0" lineHeight="0"
+          <u-tabs
+            :list="smallTabs"
+            @change="changeSmallTab"
+            :current="curSmallTabIndex"
+            lineWidth="0"
+            lineHeight="0"
             activeStyle="height: 68rpx; display: flex; align-items: center; justify-content: center; padding: 0 24rpx; border-radius: 24rpx; background: #E7EFFF; color: #3D8FFD; border: 1px solid #3D8FFD; box-sizing: border-box;"
             inactiveStyle="height: 68rpx; display: flex; align-items: center; justify-content: center; padding: 0 24rpx; border-radius: 24rpx; border: 1px solid #eaeaea; box-sizing: border-box;"
-            itemStyle="padding: 0; border-radius: 24rpx; color: #999999; margin-right: 16rpx; font-size: 28rpx;">
+            itemStyle="padding: 0; border-radius: 24rpx; color: #999999; margin-right: 16rpx; font-size: 28rpx;"
+          >
           </u-tabs>
 
           <view class="date" :class="startDate ? 'active' : ''" @tap="isShowDatePicker = true">
@@ -64,7 +79,9 @@
               <view class="row">
                 <view class="label">服务项目</view>
                 <view class="value">
-                  <view class="val">{{item.pgOrderProducts.map(o => `${o.mainName || ''}${item.orderSmallTypeText}x${o.num}`).join(',')}}</view>
+                  <view class="val">{{
+                    item.pgOrderProducts.map(o => `${o.mainName || ''}${item.orderSmallTypeText}x${o.num}`).join(',')
+                  }}</view>
                 </view>
               </view>
               <view class="row">
@@ -72,8 +89,14 @@
                 <view class="value">
                   <view class="val">{{ item.userName }} {{ item.userMobile }}</view>
                   <view class="num" v-if="item.customerTotalNum > 0">
-                    (共<text>{{ item.customerSortNum || 0 }}</text>/{{ item.customerTotalNum || 0 }}单)</view>
-                  <view class="fun" v-if="orderStatus_v(item.orderStatus) !== 'DQD'" @tap.stop="$callPhone(item.userMobile)">
+                    (共<text>{{ item.customerSortNum || 0 }}</text
+                    >/{{ item.customerTotalNum || 0 }}单)</view
+                  >
+                  <view
+                    class="fun"
+                    v-if="orderStatus_v(item.orderStatus) !== 'DQD'"
+                    @tap.stop="$callPhone(item.userMobile)"
+                  >
                     <text class="iconfont icon-call"></text>
                     <view class="text">联系Ta</view>
                   </view>
@@ -84,13 +107,17 @@
                 <view class="label">服务地址</view>
                 <view class="value">
                   <view class="val address ellipsis-3">{{ item.address || item.gpsAddress }}</view>
-                  <view class="fun" v-if="orderStatus_v(item.orderStatus) !== 'DQD'" @tap.stop="
-                    $openLocation({
-                      lat: item.lat,
-                      lng: item.lng,
-                      address: item.address || item.gpsAddress,
-                    })
-                    ">
+                  <view
+                    class="fun"
+                    v-if="orderStatus_v(item.orderStatus) !== 'DQD'"
+                    @tap.stop="
+                      $openLocation({
+                        lat: item.lat,
+                        lng: item.lng,
+                        address: item.address || item.gpsAddress
+                      })
+                    "
+                  >
                     <text class="iconfont icon-daohang"></text>
                     <view class="text">导航</view>
                   </view>
@@ -100,17 +127,40 @@
             <view class="item-btn" @tap.stop>
               <!-- 待接单 -->
               <block v-if="orderStatus_v(item.orderStatus) == 'DJD'">
-                <u-button plain type="primary" text="配件申请" @tap="" v-if="item.orderType != 'INSTALL'" @tap="toPartsApply(item.id)"></u-button>
-                <u-button plain type="primary" text="取消加急" @tap="actionUrgent(item.id, false)"
-                  v-if="item.orderFlags && item.orderFlags.some((o) => o.tag == 'JIA_JI')"></u-button>
+                <u-button
+                  plain
+                  type="primary"
+                  text="配件申请"
+                  @tap=""
+                  v-if="item.orderType != 'INSTALL'"
+                  @tap="toPartsApply(item.id)"
+                ></u-button>
+                <u-button
+                  plain
+                  type="primary"
+                  text="取消加急"
+                  @tap="actionUrgent(item.id, false)"
+                  v-if="item.orderFlags && item.orderFlags.some(o => o.tag == 'JIA_JI')"
+                ></u-button>
                 <u-button plain type="primary" text="加急" @tap="actionUrgent(item.id, true)" v-else></u-button>
                 <u-button type="primary" text="接单" @tap="actionReceive(item.id)"></u-button>
               </block>
               <!-- 服务中 -->
               <block v-if="orderStatus_v(item.orderStatus) == 'FWZ' || orderStatus_v(item.orderStatus) == 'YCD'">
-                <u-button plain type="primary" text="配件申请" v-if="item.orderType != 'INSTALL'" @tap="toPartsApply(item.id)"></u-button>
-                <u-button plain type="primary" text="辅材收费" @tap="toCharge(item.id, 'M')"
-                  v-if="item.orderType == 'INSTALL'"></u-button>
+                <u-button
+                  plain
+                  type="primary"
+                  text="配件申请"
+                  v-if="item.orderType != 'INSTALL'"
+                  @tap="toPartsApply(item.id)"
+                ></u-button>
+                <u-button
+                  plain
+                  type="primary"
+                  text="辅材收费"
+                  @tap="toCharge(item.id, 'M')"
+                  v-if="item.orderType == 'INSTALL'"
+                ></u-button>
                 <u-button plain type="primary" text="配件收费" @tap="toCharge(item.id, 'P')" v-else></u-button>
                 <u-button type="primary" text="过程反馈" @tap="toFeedback(item.id)"></u-button>
               </block>
@@ -123,7 +173,6 @@
         </view>
 
         <Loading :loadStatus="loadStatus" :dataList="dataList" />
-
       </view>
     </zj-page-layout>
 
@@ -132,11 +181,11 @@
 </template>
 
 <script>
-import zjDialogDateRangePicker from '@/components/zj-dialog/zj-dialog-dateRangePicker.vue';
+import zjDialogDateRangePicker from '@/components/zj-dialog/zj-dialog-dateRangePicker.vue'
 
 export default {
   components: {
-    zjDialogDateRangePicker,
+    zjDialogDateRangePicker
   },
 
   data() {
@@ -147,7 +196,7 @@ export default {
         { name: '待接单', value: 'DJD', num: 0 },
         { name: '服务中', value: 'FWZ', num: 0 },
         { name: '已完工', value: 'YWG', num: 0 },
-        { name: '异常待处理', value: 'YCD', num: 0 },
+        { name: '异常待处理', value: 'YCD', num: 0 }
       ],
       curMainTab: '',
       curSmallTab: 0,
@@ -156,7 +205,7 @@ export default {
         { id: 0, name: '全部' },
         { id: 1, name: '今天' },
         { id: 2, name: '明天' },
-        { id: 3, name: '其他' },
+        { id: 3, name: '其他' }
       ],
       curOrderType: '',
 
@@ -172,273 +221,289 @@ export default {
       scrollLeft: 0,
       scrollViewWidth: 0,
       tabsRect: {
-        left: 0,
+        left: 0
       },
 
       isYb: false, // 是否延保单
-      isWb: false, // 是否维保单
-
-    };
+      isWb: false // 是否维保单
+    }
   },
 
   async onLoad({ tab, isYb, isWb }) {
-    this.crossPage.$on('refreshWorkorderList', (data) => {
-      if(data && data.tab) {
-        this.curMainTab = data.tab;
+    this.crossPage.$on('refreshWorkorderList', data => {
+      if (data && data.tab) {
+        this.curMainTab = data.tab
       }
-      this.refreshList();
-    });
+      this.refreshList()
+    })
 
-    if(isYb){
-      this.isYb = true;
+    if (isYb) {
+      this.isYb = true
     }
-    if(isWb){
-      this.isWb = true;
+    if (isWb) {
+      this.isWb = true
     }
 
-    this.getCount();
+    this.getCount()
 
-    this.curMainTab = tab || '';
-    this.refreshList();
+    this.curMainTab = tab || ''
+    this.refreshList()
 
-    this.resize();
+    this.resize()
   },
 
   onUnload() {
-    this.crossPage.$off('refreshWorkorderList');
+    this.crossPage.$off('refreshWorkorderList')
   },
 
   methods: {
-    orderStatus_v(orderStatus){
-      if (["DYY"].includes(orderStatus)) {
+    orderStatus_v(orderStatus) {
+      if (['DYY'].includes(orderStatus)) {
         // 待预约
-        return "DYY"
-      } else if (["DQD"].includes(orderStatus)) {
+        return 'DYY'
+      } else if (['DQD'].includes(orderStatus)) {
         // 待抢单
-        return "DQD"
-      } else if (["DSHPG", "CJ", "YPD", "DXSPD", "DZBPG", "DWDSPGP", "DXSSPGP", "DTJXSSPGP", "DZBSPGP", "DFZXPD", "DFZXSPGP", 'XSBH', "TJXSBH", "ZBBH", "FZXBH", "FL"].includes(orderStatus)) {
+        return 'DQD'
+      } else if (
+        [
+          'DSHPG',
+          'CJ',
+          'YPD',
+          'DXSPD',
+          'DZBPG',
+          'DWDSPGP',
+          'DXSSPGP',
+          'DTJXSSPGP',
+          'DZBSPGP',
+          'DFZXPD',
+          'DFZXSPGP',
+          'XSBH',
+          'TJXSBH',
+          'ZBBH',
+          'FZXBH',
+          'FL'
+        ].includes(orderStatus)
+      ) {
         // 待商户派工
-        return "DSHPG"
-      } else if (["DWDPG", "DWDPD", "WDBH"].includes(orderStatus)) {
+        return 'DSHPG'
+      } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(orderStatus)) {
         // 待网点派工
-        return "DWDPG"
-      } else if (["DJD", "DSM", "YZP"].includes(orderStatus)) {
+        return 'DWDPG'
+      } else if (['DJD', 'DSM', 'YZP'].includes(orderStatus)) {
         // 待接单
-        return "DJD"
-      } else if (["FWZ", "GCSZT", "BFWG"].includes(orderStatus)) {
+        return 'DJD'
+      } else if (['FWZ', 'GCSZT', 'BFWG'].includes(orderStatus)) {
         // 服务中
-        return "FWZ"
-      } else if (["YCD"].includes(orderStatus)) {
+        return 'FWZ'
+      } else if (['YCD'].includes(orderStatus)) {
         // 异常单
-        return "YCD"
-      } else if (["YWG", "GCSZX", "WDWG", "YWGO"].includes(orderStatus)) {
+        return 'YCD'
+      } else if (['YWG', 'GCSZX', 'WDWG', 'YWGO'].includes(orderStatus)) {
         // 已完工待结算
-        return "YWG"
-      } else if (["YJS", "LRCD"].includes(orderStatus)) {
+        return 'YWG'
+      } else if (['YJS', 'LRCD'].includes(orderStatus)) {
         // 已结算
-        return "YJS"
-      } else if (["YQX", "FWZT", "YCGB", "FWQX"].includes(orderStatus)) {
+        return 'YJS'
+      } else if (['YQX', 'FWZT', 'YCGB', 'FWQX'].includes(orderStatus)) {
         // 已取消
-        return "YQX"
+        return 'YQX'
       }
-      return ""
+      return ''
     },
     // 触发下拉刷新
     async refresherrefresh(e) {
-      this.refresherTriggered = true;
+      this.refresherTriggered = true
 
-      this.refreshList();
+      this.refreshList()
     },
 
     // 滚动到底部
     scrolltolower(e) {
       if (this.loadStatus === 0) {
-        this.pageNum++;
-        this.getList();
+        this.pageNum++
+        this.getList()
       }
     },
 
     // 获取统计数量
     getCount() {
-      this.$api.post('/pg/order/base/status/count', {
-        isYb: this.isYb,
-        isWb: this.isWb,
-      }).then((res) => {
-        if (!res.data) return false;
-        const data = res.data;
-        this.mainTabs[0].num = (data.dqd || 0) + (data.djd || 0) + (data.fwz || 0) + (data.ywg || 0) + (data.ycd || 0);
-        this.mainTabs[1].num = data.dqd || 0;
-        this.mainTabs[2].num = data.djd || 0;
-        this.mainTabs[3].num = data.fwz || 0;
-        this.mainTabs[4].num = data.ywg || 0;
-        this.mainTabs[5].num = data.ycd || 0;
-      });
+      this.$api
+        .post('/pg/order/base/status/count', {
+          isYb: this.isYb,
+          isWb: this.isWb
+        })
+        .then(res => {
+          if (!res.data) return false
+          const data = res.data
+          this.mainTabs[0].num = (data.dqd || 0) + (data.djd || 0) + (data.fwz || 0) + (data.ywg || 0) + (data.ycd || 0)
+          this.mainTabs[1].num = data.dqd || 0
+          this.mainTabs[2].num = data.djd || 0
+          this.mainTabs[3].num = data.fwz || 0
+          this.mainTabs[4].num = data.ywg || 0
+          this.mainTabs[5].num = data.ycd || 0
+        })
     },
 
     // 获取列表
     getList() {
-      this.loadStatus = 1;
-      this.$api.post('/pg/order/base/list', {
-        pageNum: this.pageNum,
-        pageSize: 5,
-        keyword: '',
-        orderBaseStatus: this.curMainTab,
-        byDay: this.curSmallTab || '',
-        startTime: this.startDate ? this.startDate + ' 00:00:00' : '',
-        endTime: this.endDate ? this.endDate + ' 23:59:59' : '',
-        isYb: this.isYb,
-        isWb: this.isWb,
-      }).then((res) => {
-          this.loadStatus = 0;
-          let list = res.data.records;
+      this.loadStatus = 1
+      this.$api
+        .post('/pg/order/base/list', {
+          pageNum: this.pageNum,
+          pageSize: 5,
+          keyword: '',
+          orderBaseStatus: this.curMainTab,
+          byDay: this.curSmallTab || '',
+          startTime: this.startDate ? this.startDate + ' 00:00:00' : '',
+          endTime: this.endDate ? this.endDate + ' 23:59:59' : '',
+          isYb: this.isYb,
+          isWb: this.isWb
+        })
+        .then(res => {
+          this.loadStatus = 0
+          let list = res.data.records
           if (list.length < 5) {
-            this.loadStatus = 2;
+            this.loadStatus = 2
           }
 
-          this.dataList = this.pageNum === 1 ? list : this.dataList.concat(list);
+          this.dataList = this.pageNum === 1 ? list : this.dataList.concat(list)
         })
         .catch(() => {
-          this.loadStatus = 2;
+          this.loadStatus = 2
+        })
+        .finally(res => {
+          this.refresherTriggered = false
         })
-        .finally((res) => {
-          this.refresherTriggered = false;
-        });
     },
 
     findMainTabIndex(val) {
       for (var i = 0; i < this.mainTabs.length; i++) {
         if (this.mainTabs[i]['value'] == val) {
-          return i;
+          return i
         }
       }
     },
 
     setScrollLeft() {
       // 当前活动tab的布局信息,有tab菜单的width和left(为元素左边界到父元素左边界的距离)等信息
-      const tabRect = this.mainTabs[this.findMainTabIndex(this.curMainTab)];
+      const tabRect = this.mainTabs[this.findMainTabIndex(this.curMainTab)]
       // 累加得到当前item到左边的距离
-      const offsetLeft = this.mainTabs
-        .slice(0, this.findMainTabIndex(this.curMainTab))
-        .reduce((total, curr) => {
-          return total + curr.rect.width;
-        }, 0);
+      const offsetLeft = this.mainTabs.slice(0, this.findMainTabIndex(this.curMainTab)).reduce((total, curr) => {
+        return total + curr.rect.width
+      }, 0)
       // 此处为屏幕宽度
-      const windowWidth = uni.$u.sys().windowWidth;
+      const windowWidth = uni.$u.sys().windowWidth
       // 将活动的tabs-item移动到屏幕正中间,实际上是对scroll-view的移动
       let scrollLeft =
         offsetLeft -
         (this.tabsRect.width - tabRect.rect.width) / 2 -
         (windowWidth - this.tabsRect.right) / 2 +
-        this.tabsRect.left / 2;
+        this.tabsRect.left / 2
       // 这里做一个限制,限制scrollLeft的最大值为整个scroll-view宽度减去tabs组件的宽度
-      scrollLeft = Math.min(scrollLeft, this.scrollViewWidth);
-      this.scrollLeft = Math.max(0, scrollLeft);
+      scrollLeft = Math.min(scrollLeft, this.scrollViewWidth)
+      this.scrollLeft = Math.max(0, scrollLeft)
     },
 
     // 获取所有标签的尺寸
     resize() {
       if (this.mainTabs.length === 0) {
-        return;
+        return
       }
 
-      Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(
-        ([tabsRect, itemRect = []]) => {
-          this.tabsRect = tabsRect;
-          this.scrollViewWidth = 0;
-          itemRect.map((item, index) => {
-            // 计算scroll-view的宽度,这里
-            this.scrollViewWidth += item.width;
-            // 另外计算每一个item的中心点X轴坐标
-            this.mainTabs[index].rect = item;
-          });
-          // 获取了tabs的尺寸之后,设置滑块的位置
-          this.setScrollLeft();
-        }
-      );
+      Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
+        this.tabsRect = tabsRect
+        this.scrollViewWidth = 0
+        itemRect.map((item, index) => {
+          // 计算scroll-view的宽度,这里
+          this.scrollViewWidth += item.width
+          // 另外计算每一个item的中心点X轴坐标
+          this.mainTabs[index].rect = item
+        })
+        // 获取了tabs的尺寸之后,设置滑块的位置
+        this.setScrollLeft()
+      })
     },
 
     // 获取导航菜单的尺寸
     getTabsRect() {
-      return new Promise((resolve) => {
-        this.queryRect('tab-scroll-view').then((size) => resolve(size));
-      });
+      return new Promise(resolve => {
+        this.queryRect('tab-scroll-view').then(size => resolve(size))
+      })
     },
 
     // 获取所有标签的尺寸
     getAllItemRect() {
-      return new Promise((resolve) => {
-        const promiseAllArr = this.mainTabs.map((item, index) =>
-          this.queryRect(`tab-item-${index}`, true)
-        );
-        Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
-      });
+      return new Promise(resolve => {
+        const promiseAllArr = this.mainTabs.map((item, index) => this.queryRect(`tab-item-${index}`, true))
+        Promise.all(promiseAllArr).then(sizes => resolve(sizes))
+      })
     },
 
     // 获取各个标签的尺寸
     queryRect(el, item) {
-      return new Promise((resolve) => {
-        this.$uGetRect(`.${el}`).then((size) => {
-          resolve(size);
-        });
-      });
+      return new Promise(resolve => {
+        this.$uGetRect(`.${el}`).then(size => {
+          resolve(size)
+        })
+      })
     },
 
     // 切换大状态
     changeMainTab(val) {
-      this.curMainTab = val;
+      this.curMainTab = val
       // this.curMainTab = val.value;
       if (this.startDate == '' || this.endDate == '') {
-        this.curSmallTab = 0;
-        this.curSmallTabIndex = 0;
+        this.curSmallTab = 0
+        this.curSmallTabIndex = 0
       } else {
-        this.curSmallTab = '';
-        this.curSmallTabIndex = '';
+        this.curSmallTab = ''
+        this.curSmallTabIndex = ''
       }
 
-      this.refreshList();
-      this.resize();
+      this.refreshList()
+      this.resize()
     },
 
     // 切换小状态
     changeSmallTab(item) {
-      this.curSmallTab = item.id;
-      this.curSmallTabIndex = item.index;
-      this.startDate = '';
-      this.endDate = '';
-      this.refreshList();
+      this.curSmallTab = item.id
+      this.curSmallTabIndex = item.index
+      this.startDate = ''
+      this.endDate = ''
+      this.refreshList()
     },
 
     // 选择日期
     confirmDate(item) {
-      let [start, end] = item;
+      let [start, end] = item
       if (start == '' || end == '') {
-        this.curSmallTab = 0;
-        this.curSmallTabIndex = 0;
-        this.startDate = '';
-        this.endDate = '';
-        return;
+        this.curSmallTab = 0
+        this.curSmallTabIndex = 0
+        this.startDate = ''
+        this.endDate = ''
+        return
       }
-      this.curSmallTab = '';
-      this.curSmallTabIndex = '';
-      this.startDate = start;
-      this.endDate = end;
+      this.curSmallTab = ''
+      this.curSmallTabIndex = ''
+      this.startDate = start
+      this.endDate = end
 
-      this.refreshList();
+      this.refreshList()
     },
 
     // 刷新列表
     refreshList() {
-      this.dataList = [];
-      this.pageNum = 1;
-      this.getList();
-      this.getCount();
+      this.dataList = []
+      this.pageNum = 1
+      this.getList()
+      this.getCount()
     },
 
     // 去搜索页面
     toSearchPage() {
       this.$navToPage({
         url: '/packageWorkorder/pages/search'
-      });
+      })
     },
 
     // 加急
@@ -446,16 +511,20 @@ export default {
       this.$modal({
         title: '加急操作',
         content: '加急操作,会消息通知所有订单相关人员,请谨慎操作。'
-      }).then(() => {
-        this.$api.post('/pg/order/base/flag', {
-          orderBaseId: id,
-          orderFlagEnum: 'JIA_JI',
-          flag: flag,
-        }).then(res => {
-          this.$successToast();
-          this.refreshList();
+      })
+        .then(() => {
+          this.$api
+            .post('/pg/order/base/flag', {
+              orderBaseId: id,
+              orderFlagEnum: 'JIA_JI',
+              flag: flag
+            })
+            .then(res => {
+              this.$successToast()
+              this.refreshList()
+            })
         })
-      }).catch(() => { })
+        .catch(() => {})
     },
 
     // 接单
@@ -463,22 +532,32 @@ export default {
       this.$modal({
         title: '接单确认',
         content: '确认接单?'
-      }).then(() => {
-        this.$api.post('/pg/order/base/rece', {
-          orderBaseId: id,
-        }).then(res => {
-          this.$successToast();
-          this.refreshList();
-          this.toDetail(id);
+      })
+        .then(() => {
+          this.$api
+            .post('/pg/order/base/rece', {
+              orderBaseId: id
+            })
+            .then(res => {
+              this.$successToast()
+              this.refreshList()
+              this.toDetail(id)
+            })
         })
-      }).catch(() => { })
+        .catch(() => {})
     },
 
     // 去收费
     toCharge(id, type) {
-      this.$navToPage({
-        url: `/packageMaterial/pages/sale/index?type=${type}&oid=${id}`
-      })
+      if (type == 'M') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/sale/index?type=${type}&oid=${id}`
+        })
+      } else if (type == 'P') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/newSale/index?type=${type}&oid=${id}`
+        })
+      }
     },
 
     // 去配件申请
@@ -501,23 +580,26 @@ export default {
       })
     },
 
-    qdOrder(item){
+    qdOrder(item) {
       this.$modal({
         title: '抢单确认',
         content: '确认抢单?'
-      }).then(() => {
-        this.$api.post('/pg/order/base/qd', {
-          orderBaseId: item.id,
-        }).then(res => {
-          this.$successToast();
-          this.refreshList();
-          this.toDetail(item.id);
+      })
+        .then(() => {
+          this.$api
+            .post('/pg/order/base/qd', {
+              orderBaseId: item.id
+            })
+            .then(res => {
+              this.$successToast()
+              this.refreshList()
+              this.toDetail(item.id)
+            })
         })
-      }).catch(() => { })
+        .catch(() => {})
     }
-
-  },
-};
+  }
+}
 </script>
 
 <style lang="scss" scopeds>
@@ -628,15 +710,15 @@ export default {
     }
 
     &.active {
-      background: #E7EFFF;
-      border: 1px solid #3D8FFD;
+      background: #e7efff;
+      border: 1px solid #3d8ffd;
 
       .text {
-        color: #3D8FFD;
+        color: #3d8ffd;
       }
 
       .iconfont {
-        color: #3D8FFD;
+        color: #3d8ffd;
       }
     }
   }

+ 186 - 134
src/packageWorkorder/pages/processFeedback.vue

@@ -4,8 +4,14 @@
       <view class="type-container mt30">
         <view class="common-title"><text>*</text>反馈类型</view>
         <view class="list">
-          <view class="item" v-for="(item, index) in typeList" :key="index"
-            :class="typeVal === item.value ? 'active' : ''" @tap="changeType(item.value)">{{ item.name }}</view>
+          <view
+            class="item"
+            v-for="(item, index) in typeList"
+            :key="index"
+            :class="typeVal === item.value ? 'active' : ''"
+            @tap="changeType(item.value)"
+            >{{ item.name }}</view
+          >
         </view>
       </view>
 
@@ -34,13 +40,22 @@
       <view class="over-container mt30" v-if="typeVal == '3'">
         <view class="row">
           <view class="label"><text>*</text>完工采集</view>
-          <view class="btn"><u-button type="primary"
-              :text="orderDetail && orderDetail.isGather == 'YES' ? '查看采集' : '数据采集'" @click="toCollect"></u-button>
+          <view class="btn"
+            ><u-button
+              type="primary"
+              :text="orderDetail && orderDetail.isGather == 'YES' ? '查看采集' : '数据采集'"
+              @click="toCollect"
+            ></u-button>
           </view>
         </view>
         <view class="row">
-          <view class="label">收费项目<u-icon name="question-circle" color="#999999"
-              @click="$tips('在服务过程中消耗的产品(配件)')"></u-icon></view>
+          <view class="label"
+            >收费项目<u-icon
+              name="question-circle"
+              color="#999999"
+              @click="$tips('在服务过程中消耗的产品(配件)')"
+            ></u-icon
+          ></view>
           <view class="btn"><u-button type="primary" text="添加" @click="toCharge"></u-button></view>
         </view>
       </view>
@@ -62,7 +77,7 @@
       <view class="mt30 image-container" v-if="typeVal == '1' || typeVal == '4'">
         <view class="common-title">上传图片(最多6张)</view>
         <view class="images">
-          <block v-for="(item, index) in imageList" :key='index'>
+          <block v-for="(item, index) in imageList" :key="index">
             <view class="img">
               <image :src="item.url" mode="aspectFill" @tap="prevImg(item.url)"></image>
               <text class="iconfont icon-guanbi1" @tap="delImage(index)"></text>
@@ -82,92 +97,104 @@
       </view>
     </template>
 
-    <u-datetime-picker :show="isShowDatePicker" v-model="datePickerValue" type="datetime" placeholder="选择日期和时间"
-      @confirm="confirmDate" @cancel="isShowDatePicker = false" @close="isShowDatePicker = false" :minDate="minDate"
-      :formatter="formatter" :style="{ width: '100%' }" />
-    <u-datetime-picker :show="isShowDatePicker2" v-model="datePickerValue2" type="datetime" placeholder="选择日期和时间"
-      @confirm="confirmDate2" @cancel="isShowDatePicker2 = false" @close="isShowDatePicker2 = false" :minDate="minDate2"
-      :formatter="formatter" :style="{ width: '100%' }" />
-
+    <u-datetime-picker
+      :show="isShowDatePicker"
+      v-model="datePickerValue"
+      type="datetime"
+      placeholder="选择日期和时间"
+      @confirm="confirmDate"
+      @cancel="isShowDatePicker = false"
+      @close="isShowDatePicker = false"
+      :minDate="minDate"
+      :formatter="formatter"
+      :style="{ width: '100%' }"
+    />
+    <u-datetime-picker
+      :show="isShowDatePicker2"
+      v-model="datePickerValue2"
+      type="datetime"
+      placeholder="选择日期和时间"
+      @confirm="confirmDate2"
+      @cancel="isShowDatePicker2 = false"
+      @close="isShowDatePicker2 = false"
+      :minDate="minDate2"
+      :formatter="formatter"
+      :style="{ width: '100%' }"
+    />
   </zj-page-layout>
 </template>
 
 <script>
-import { uploadImgFull } from '@/common/utils/util.js';
+import { uploadImgFull } from '@/common/utils/util.js'
 
 export default {
   data() {
     return {
       datetime: null,
-      limitDateTime: new Date('2024-07-19 12:23:36')
-
-
+      limitDateTime: new Date('2024-07-19 12:23:36'),
 
-
-      ,
       id: '',
       orderDetail: {},
       typeList: [
         { name: '其他', value: '1' },
         { name: '改约', value: '2' },
         { name: '完工反馈', value: '3' },
-        { name: '异常反馈', value: '4' },
+        { name: '异常反馈', value: '4' }
       ],
       typeVal: '1',
-      minDate: (new Date()).getTime(),
+      minDate: new Date().getTime(),
       minDate2: null,
       date: '',
-      datePickerValue: (new Date()).getTime(),
+      datePickerValue: new Date().getTime(),
       isShowDatePicker: false,
       date2: '',
-      datePickerValue2: (new Date()).getTime(),
+      datePickerValue2: new Date().getTime(),
       isShowDatePicker2: false,
       remarkVal: '', // 备注值
       imageList: [],
       signNameUrl: '',
-      canClickBtn: true,
-    };
+      canClickBtn: true
+    }
   },
 
   async onLoad({ id }) {
-    this.id = id;
-    this.getOrderDetail();
+    this.id = id
+    this.getOrderDetail()
 
-    this.crossPage.$on('finishSign', async (data) => {
+    this.crossPage.$on('finishSign', async data => {
       // this.$showLoading();
-      this.signNameUrl = data;
+      this.signNameUrl = data
     })
 
     this.crossPage.$on('refreshFeedbackForm', () => {
-      this.getOrderDetail();
+      this.getOrderDetail()
     })
   },
 
   onUnload() {
-    this.crossPage.$off('finishSign');
-    this.crossPage.$off('refreshFeedbackForm');
+    this.crossPage.$off('finishSign')
+    this.crossPage.$off('refreshFeedbackForm')
   },
 
   methods: {
-
     confirmDate(e) {
-      this.isShowDatePicker = false;
-      this.date = ""
+      this.isShowDatePicker = false
+      this.date = ''
       this.$nextTick(() => {
         this.date = this.formatTimestamp(e.value)
-        this.date2 = ""
-        this.datePickerValue2 = (new Date(e.value)).getTime()
+        this.date2 = ''
+        this.datePickerValue2 = new Date(e.value).getTime()
       })
     },
 
     confirmDate2(e) {
-      this.isShowDatePicker2 = false;
+      this.isShowDatePicker2 = false
       this.date2 = this.formatTimestamp(e.value)
     },
 
     setisShowDatePicker2() {
       if (!this.date) {
-        return this.$tips('请先选择预约开始时间');
+        return this.$tips('请先选择预约开始时间')
       }
       this.minDate2 = Number(new Date(this.date))
       this.$nextTick(() => {
@@ -197,28 +224,30 @@ export default {
     // 获取详情
     getOrderDetail() {
       return new Promise((resolve, reject) => {
-        this.$api.post('/pg/order/base/detail', {
-          orderBaseId: this.id,
-        }).then((res) => {
-          this.orderDetail = res.data;
-          if (res.data.appointmentTime) {
-            this.typeList[1].name = '改约';
-          } else {
-            this.typeList[1].name = '预约';
-          }
-          resolve(1);
-        })
-          .catch((res) => {
-            reject(0);
-          });
-      });
+        this.$api
+          .post('/pg/order/base/detail', {
+            orderBaseId: this.id
+          })
+          .then(res => {
+            this.orderDetail = res.data
+            if (res.data.appointmentTime) {
+              this.typeList[1].name = '改约'
+            } else {
+              this.typeList[1].name = '预约'
+            }
+            resolve(1)
+          })
+          .catch(res => {
+            reject(0)
+          })
+      })
     },
 
     changeType(val) {
       if (!this.orderDetail.appointmentTime && val == 3) {
-        return this.$tips('请先预约工单再完工反馈');
+        return this.$tips('请先预约工单再完工反馈')
       }
-      this.typeVal = val;
+      this.typeVal = val
     },
 
     // 去采集
@@ -229,29 +258,29 @@ export default {
     },
 
     confirmDate(e) {
-      this.isShowDatePicker = false;
-      this.date = ""
+      this.isShowDatePicker = false
+      this.date = ''
       this.$nextTick(() => {
         this.date = this.formatTimestamp(e.value)
-        this.date2 = ""
-        this.datePickerValue2 = (new Date(e.value)).getTime()
+        this.date2 = ''
+        this.datePickerValue2 = new Date(e.value).getTime()
       })
     },
 
     confirmDate2(e) {
-      this.isShowDatePicker2 = false;
+      this.isShowDatePicker2 = false
       this.date2 = this.formatTimestamp(e.value)
     },
 
     formatTimestamp(timestamp) {
-      const date = new Date(timestamp);
-      const year = date.getFullYear();
-      const month = (date.getMonth() + 1).toString().padStart(2, '0');
-      const day = date.getDate().toString().padStart(2, '0');
-      const hours = date.getHours().toString().padStart(2, '0');
-      const minutes = date.getMinutes().toString().padStart(2, '0');
-      const seconds = date.getSeconds().toString().padStart(2, '0');
-      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+      const date = new Date(timestamp)
+      const year = date.getFullYear()
+      const month = (date.getMonth() + 1).toString().padStart(2, '0')
+      const day = date.getDate().toString().padStart(2, '0')
+      const hours = date.getHours().toString().padStart(2, '0')
+      const minutes = date.getMinutes().toString().padStart(2, '0')
+      const seconds = date.getSeconds().toString().padStart(2, '0')
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
     },
 
     // 添加图片
@@ -259,20 +288,20 @@ export default {
       uni.chooseImage({
         count: 6 - this.imageList.length,
         success: res => {
-          uni.showLoading();
+          uni.showLoading()
           res.tempFilePaths.forEach(async item => {
-            let data = await uploadImgFull(item);
-            this.imageList.push(data);
-          });
-          uni.hideLoading();
+            let data = await uploadImgFull(item)
+            this.imageList.push(data)
+          })
+          uni.hideLoading()
         },
-        fail: err => { }
+        fail: err => {}
       })
     },
 
     // 删除图片
     delImage(index) {
-      this.imageList.splice(index, 1);
+      this.imageList.splice(index, 1)
     },
 
     //预览图片
@@ -294,9 +323,19 @@ export default {
 
     // 去收费
     toCharge() {
-      this.$navToPage({
-        url: `/packageMaterial/pages/sale/index?type=${this.orderDetail.orderType == 'INSTALL' ? 'M' : 'P'}&oid=${this.id}`
-      })
+      if (this.orderDetail.orderType == 'M') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/sale/index?type=${this.orderDetail.orderType == 'INSTALL' ? 'M' : 'P'}&oid=${
+            this.id
+          }`
+        })
+      } else if (this.orderDetail.orderType == 'P') {
+        this.$navToPage({
+          url: `/packageMaterial/pages/newSale/index?type=${this.orderDetail.orderType == 'INSTALL' ? 'M' : 'P'}&oid=${
+            this.id
+          }`
+        })
+      }
     },
 
     toSignName() {
@@ -307,88 +346,101 @@ export default {
 
     // 提交
     async submitData() {
-      if (!this.canClickBtn) return this.$toast('请勿频繁操作');
-      this.canClickBtn = false;
-      setTimeout(() => { this.canClickBtn = true }, 3000)
+      if (!this.canClickBtn) return this.$toast('请勿频繁操作')
+      this.canClickBtn = false
+      setTimeout(() => {
+        this.canClickBtn = true
+      }, 3000)
 
-      if (this.typeVal == '2' && !this.date) return this.$toast('请选择改约时间');
-      if (this.typeVal == '2' && !this.date2) return this.$toast('请选择改约时间');
-      if (this.typeVal == '3' && !this.signNameUrl) return this.$toast('请签名');
-      if ((this.typeVal == '1' || this.typeVal == '4') && !this.remarkVal) return this.$toast('请填写备注信息');
+      if (this.typeVal == '2' && !this.date) return this.$toast('请选择改约时间')
+      if (this.typeVal == '2' && !this.date2) return this.$toast('请选择改约时间')
+      if (this.typeVal == '3' && !this.signNameUrl) return this.$toast('请签名')
+      if ((this.typeVal == '1' || this.typeVal == '4') && !this.remarkVal) return this.$toast('请填写备注信息')
 
-      let params = {};
+      let params = {}
 
       if (this.typeVal == '2') {
-        params.id = this.id;
-        params.appointmentTime = this.date;
-        params.appointmentEndTime = this.date2;
-        params.remark = this.remarkVal;
+        params.id = this.id
+        params.appointmentTime = this.date
+        params.appointmentEndTime = this.date2
+        params.remark = this.remarkVal
       } else {
-        params.orderBaseId = this.id;
-        params.content = this.remarkVal;
+        params.orderBaseId = this.id
+        params.content = this.remarkVal
       }
 
       if (this.typeVal == '1') {
-        params.type = '其他';
-        params.typeText = '其他';
+        params.type = '其他'
+        params.typeText = '其他'
       }
       if (this.typeVal == '4') {
-        params.type = '异常反馈';
-        params.typeText = '异常反馈';
+        params.type = '异常反馈'
+        params.typeText = '异常反馈'
       }
       if (this.typeVal == '1' || this.typeVal == '4') {
-        params.imgSrc = this.imageList.map(item => {
-          return item.url
-        }).join(',')
+        params.imgSrc = this.imageList
+          .map(item => {
+            return item.url
+          })
+          .join(',')
       }
 
       if (this.typeVal == '3') {
-        const lo = await this.$getAddress();
+        const lo = await this.$getAddress()
 
-        params.orderBaseId = this.id;
-        params.overRemark = this.remarkVal;
-        params.userSign = this.signNameUrl;
-        params.address = lo.address || '';
+        params.orderBaseId = this.id
+        params.overRemark = this.remarkVal
+        params.userSign = this.signNameUrl
+        params.address = lo.address || ''
       }
 
       // 其他/异常反馈
       if (this.typeVal == '1' || this.typeVal == '4') {
-        this.$api.postJson('/pg/order/base/operator/add', {
-          ...params
-        }).then((res) => {
-          this.submitSuccess();
-        });
+        this.$api
+          .postJson('/pg/order/base/operator/add', {
+            ...params
+          })
+          .then(res => {
+            this.submitSuccess()
+          })
       }
       // 改约
       else if (this.typeVal == '2') {
-        this.$api.post('/changeOrder/changeAppointmentTime', {
-          ...params
-        }).then((res) => {
-          this.submitSuccess();
-        });
+        this.$api
+          .post('/changeOrder/changeAppointmentTime', {
+            ...params
+          })
+          .then(res => {
+            this.submitSuccess()
+          })
       }
       // 完工反馈
       else if (this.typeVal == '3') {
-        this.$api.post('/changeOrder/submitAll', {
-          ...params
-        }).then((res) => {
-          this.submitSuccess('YWG');
-        });
+        this.$api
+          .post('/changeOrder/submitAll', {
+            ...params
+          })
+          .then(res => {
+            this.submitSuccess('YWG')
+          })
       }
     },
 
     submitSuccess(tab = '') {
-      this.$successToast('反馈成功');
-      this.crossPage.$emit('refreshWorkorderList', { tab: tab });
-      this.crossPage.$emit('refreshWorkorderDetail', '');
+      this.$successToast('反馈成功')
+      this.crossPage.$emit('refreshWorkorderList', { tab: tab })
+      this.crossPage.$emit('refreshWorkorderDetail', '')
       setTimeout(() => {
-        this.$navToPage({
-          delta: 1
-        }, 'navigateBack')
+        this.$navToPage(
+          {
+            delta: 1
+          },
+          'navigateBack'
+        )
       }, 500)
     }
-  },
-};
+  }
+}
 </script>
 
 <style lang="scss" scoped>
@@ -420,7 +472,7 @@ export default {
       line-height: 80rpx;
       text-align: center;
       border-radius: 20rpx;
-      background: #F4F5F9;
+      background: #f4f5f9;
       margin-bottom: 30rpx;
 
       &:nth-child(2n) {
@@ -528,9 +580,9 @@ export default {
       width: 40rpx;
       height: 40rpx;
       border-radius: 50%;
-      background: #FF3F42;
+      background: #ff3f42;
       font-size: 24rpx;
-      color: #FFFFFF;
+      color: #ffffff;
       text-align: center;
       line-height: 40rpx;
       display: block;
@@ -602,9 +654,9 @@ export default {
         width: 40rpx;
         height: 40rpx;
         border-radius: 50%;
-        background: #FF3F42;
+        background: #ff3f42;
         font-size: 24rpx;
-        color: #FFFFFF;
+        color: #ffffff;
         text-align: center;
         line-height: 40rpx;
         display: block;

+ 192 - 165
src/packageWorkorder/pages/search.vue

@@ -4,7 +4,8 @@
     :isScroll="true"
     :refresherTriggered="refresherTriggered"
     @refresherrefresh="refresherrefresh"
-    @scrolltolower="scrolltolower">
+    @scrolltolower="scrolltolower"
+  >
     <template slot="header">
       <view class="search-container">
         <u-search
@@ -16,7 +17,8 @@
           v-model="keyword"
           @search="searchSubmit"
           @custom="searchSubmit"
-          @clear="searchSubmit">
+          @clear="searchSubmit"
+        >
         </u-search>
       </view>
     </template>
@@ -29,7 +31,7 @@
               {{ item.orderTypeText.slice(0, 2) }}
             </view>
             <view class="tags">
-              <view class="tag red" v-for="(it, idx) in item.orderFlags" :key="idx">{{it.tagName}}</view>
+              <view class="tag red" v-for="(it, idx) in item.orderFlags" :key="idx">{{ it.tagName }}</view>
             </view>
           </view>
           <view class="status">{{ item.orderStatusText }}</view>
@@ -58,21 +60,26 @@
             <view class="value">
               <view class="val">{{ item.userName }} {{ item.userMobile }}</view>
               <view class="num" v-if="item.customerTotalNum > 0">
-                (共<text>{{ item.customerSortNum || 0 }}</text>/{{ item.customerTotalNum || 0 }}单)</view>
+                (共<text>{{ item.customerSortNum || 0 }}</text
+                >/{{ item.customerTotalNum || 0 }}单)</view
+              >
               <view class="fun">
                 <text class="iconfont icon-call"></text>
                 <view class="text">联系Ta</view>
               </view>
             </view>
           </view>
-          <view class="row address-row" @tap.stop="
+          <view
+            class="row address-row"
+            @tap.stop="
               $openLocation({
                 lat: item.lat,
                 lng: item.lng,
                 name: item.userName,
-                address: item.address || item.gpsAddress,
+                address: item.address || item.gpsAddress
               })
-            ">
+            "
+          >
             <view class="label">服务地址</view>
             <view class="value">
               <view class="val address ellipsis-3">{{ item.address || item.gpsAddress }}</view>
@@ -86,13 +93,25 @@
         <view class="item-btn" @tap.stop>
           <!-- 待接单 -->
           <block v-if="orderStatus_v(item.orderStatus) == 'DJD'">
-            <u-button plain type="primary" text="取消加急" @tap="actionUrgent(item.id, false)" v-if="item.orderFlags && item.orderFlags.some((o) => o.tag == 'JIA_JI')"></u-button>
+            <u-button
+              plain
+              type="primary"
+              text="取消加急"
+              @tap="actionUrgent(item.id, false)"
+              v-if="item.orderFlags && item.orderFlags.some(o => o.tag == 'JIA_JI')"
+            ></u-button>
             <u-button plain type="primary" text="加急" @tap="actionUrgent(item.id, true)" v-else></u-button>
             <u-button type="primary" text="接单" @tap="actionReceive(item.id)"></u-button>
           </block>
-            <!-- 服务中 -->
+          <!-- 服务中 -->
           <block v-if="orderStatus_v(item.orderStatus) == 'FWZ' || orderStatus_v(item.orderStatus) == 'YCD'">
-            <u-button plain type="primary" text="辅材收费" @tap="toCharge(item.id, 'M')" v-if="item.orderType == 'INSTALL'"></u-button>
+            <u-button
+              plain
+              type="primary"
+              text="辅材收费"
+              @tap="toCharge(item.id, 'M')"
+              v-if="item.orderType == 'INSTALL'"
+            ></u-button>
             <u-button plain type="primary" text="配件收费" @tap="toCharge(item.id, 'P')" v-else></u-button>
             <u-button type="primary" text="过程反馈" @tap="toFeedback(item.id)"></u-button>
           </block>
@@ -101,189 +120,197 @@
     </view>
 
     <Loading :loadStatus="loadStatus" :dataList="dataList" />
-
   </zj-page-layout>
   <!-- #endif -->
 
   <!-- #ifndef H5 -->
-  <web-view :src="webViewHref(`/packageWorkorder/pages/search`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
+  <web-view
+    :src="webViewHref(`/packageWorkorder/pages/search`, pam, crossPagePam)"
+    @message="crossPage.$listener"
+  ></web-view>
   <!-- #endif -->
 </template>
 
 <script>
-  // #ifdef H5
-  export default {
-    data() {
-      return {
-        keyword: '',
-				dataList: [],
-				pageNum: 1,
-				loadStatus: 0,
-        refresherTriggered: false,
+// #ifdef H5
+export default {
+  data() {
+    return {
+      keyword: '',
+		dataList: [],
+		pageNum: 1,
+		loadStatus: 0,
+      refresherTriggered: false,
+    }
+  },
+
+  onLoad({keyword}) {
+    this.keyword = keyword;
+    if(keyword) {
+      this.getList();
+    }
+	// this.getList();
+  },
+
+  methods: {
+
+    orderStatus_v(orderStatus){
+      if (["DYY"].includes(orderStatus)) {
+        // 待预约
+        return "DYY"
+      } else if (["DQD"].includes(orderStatus)) {
+        // 待抢单
+        return "DQD"
+      } else if (["DSHPG", "CJ", "YPD", "DXSPD", "DZBPG", "DWDSPGP", "DXSSPGP", "DTJXSSPGP", "DZBSPGP", "DFZXPD", "DFZXSPGP", 'XSBH', "TJXSBH", "ZBBH", "FZXBH", "FL"].includes(orderStatus)) {
+        // 待商户派工
+        return "DSHPG"
+      } else if (["DWDPG", "DWDPD", "WDBH"].includes(orderStatus)) {
+        // 待网点派工
+        return "DWDPG"
+      } else if (["DJD", "DSM", "YZP"].includes(orderStatus)) {
+        // 待接单
+        return "DJD"
+      } else if (["FWZ", "GCSZT", "BFWG"].includes(orderStatus)) {
+        // 服务中
+        return "FWZ"
+      } else if (["YCD"].includes(orderStatus)) {
+        // 异常单
+        return "YCD"
+      } else if (["YWG", "GCSZX", "WDWG", "YWGO"].includes(orderStatus)) {
+        // 已完工待结算
+        return "YWG"
+      } else if (["YJS", "LRCD"].includes(orderStatus)) {
+        // 已结算
+        return "YJS"
+      } else if (["YQX", "FWZT", "YCGB", "FWQX"].includes(orderStatus)) {
+        // 已取消
+        return "YQX"
       }
+      return ""
     },
 
-    onLoad({keyword}) {
-      this.keyword = keyword;
-      if(keyword) {
-        this.getList();
-      }
-			// this.getList();
+    getList() {
+    	this.loadStatus = 1;
+    	this.$api.post('/pg/order/base/list', {
+        pageNum: this.pageNum,
+        pageSize: 5,
+        keyword: this.keyword,
+    	}).then(res => {
+    		this.loadStatus = 0;
+    		let list = res.data.records;
+    		if (list.length < 10) {
+    		  this.loadStatus = 2;
+    		}
+    		this.dataList = this.dataList.concat(list);
+    	}).catch(() => {
+    		this.loadStatus = 2;
+    	}).finally(res => {
+    		this.refresherTriggered = false;
+    	})
     },
 
-    methods: {
-
-      orderStatus_v(orderStatus){
-        if (["DYY"].includes(orderStatus)) {
-          // 待预约
-          return "DYY"
-        } else if (["DQD"].includes(orderStatus)) {
-          // 待抢单
-          return "DQD"
-        } else if (["DSHPG", "CJ", "YPD", "DXSPD", "DZBPG", "DWDSPGP", "DXSSPGP", "DTJXSSPGP", "DZBSPGP", "DFZXPD", "DFZXSPGP", 'XSBH', "TJXSBH", "ZBBH", "FZXBH", "FL"].includes(orderStatus)) {
-          // 待商户派工
-          return "DSHPG"
-        } else if (["DWDPG", "DWDPD", "WDBH"].includes(orderStatus)) {
-          // 待网点派工
-          return "DWDPG"
-        } else if (["DJD", "DSM", "YZP"].includes(orderStatus)) {
-          // 待接单
-          return "DJD"
-        } else if (["FWZ", "GCSZT", "BFWG"].includes(orderStatus)) {
-          // 服务中
-          return "FWZ"
-        } else if (["YCD"].includes(orderStatus)) {
-          // 异常单
-          return "YCD"
-        } else if (["YWG", "GCSZX", "WDWG", "YWGO"].includes(orderStatus)) {
-          // 已完工待结算
-          return "YWG"
-        } else if (["YJS", "LRCD"].includes(orderStatus)) {
-          // 已结算
-          return "YJS"
-        } else if (["YQX", "FWZT", "YCGB", "FWQX"].includes(orderStatus)) {
-          // 已取消
-          return "YQX"
-        }
-        return ""
-      },
-
-      getList() {
-      	this.loadStatus = 1;
-      	this.$api.post('/pg/order/base/list', {
-          pageNum: this.pageNum,
-          pageSize: 5,
-          keyword: this.keyword,
-      	}).then(res => {
-      		this.loadStatus = 0;
-      		let list = res.data.records;
-      		if (list.length < 10) {
-      		  this.loadStatus = 2;
-      		}
-      		this.dataList = this.dataList.concat(list);
-      	}).catch(() => {
-      		this.loadStatus = 2;
-      	}).finally(res => {
-      		this.refresherTriggered = false;
-      	})
-      },
-
-      searchSubmit() {
-        this.refreshList();
-      },
-
-      refreshList() {
-      	this.dataList = [];
-      	this.pageNum = 1;
-      	this.getList();
-      },
-
-      // 滚动到底部
-      scrolltolower(e) {
-      	if (this.loadStatus === 0) {
-      		this.pageNum++;
-      		this.getList();
-      	}
-      },
-
-      // 触发下拉刷新
-      refresherrefresh(e) {
-      	this.refresherTriggered = true;
-      	this.refreshList();
-      },
-
-      // 加急
-      actionUrgent(id, flag) {
-        this.$modal({
-          title: '加急操作',
-          content: '加急操作,会消息通知所有订单相关人员,请谨慎操作。'
-        }).then(() => {
-          this.$api.post('/pg/order/base/flag', {
-            orderBaseId: id,
-            orderFlagEnum: 'JIA_JI',
-            flag: flag,
-          }).then(res => {
-            this.$successToast();
-            this.refreshList();
-          })
-        }).catch(() => {})
-      },
-
-      // 接单
-      actionReceive(id) {
-        this.$modal({
-          title: '接单确认',
-          content: '确认接单?'
-        }).then(() => {
-          this.$api.post('/pg/order/base/rece', {
-            orderBaseId: id,
-          }).then(res => {
-            this.$successToast();
-            this.refreshList();
-          })
-        }).catch(() => {})
-      },
-
-      // 去收费
-      toCharge(id, type) {
-        this.$navToPage({
-          url: `/packageMaterial/pages/sale/index?type=${type}`
+    searchSubmit() {
+      this.refreshList();
+    },
+
+    refreshList() {
+    	this.dataList = [];
+    	this.pageNum = 1;
+    	this.getList();
+    },
+
+    // 滚动到底部
+    scrolltolower(e) {
+    	if (this.loadStatus === 0) {
+    		this.pageNum++;
+    		this.getList();
+    	}
+    },
+
+    // 触发下拉刷新
+    refresherrefresh(e) {
+    	this.refresherTriggered = true;
+    	this.refreshList();
+    },
+
+    // 加急
+    actionUrgent(id, flag) {
+      this.$modal({
+        title: '加急操作',
+        content: '加急操作,会消息通知所有订单相关人员,请谨慎操作。'
+      }).then(() => {
+        this.$api.post('/pg/order/base/flag', {
+          orderBaseId: id,
+          orderFlagEnum: 'JIA_JI',
+          flag: flag,
+        }).then(res => {
+          this.$successToast();
+          this.refreshList();
         })
-      },
+      }).catch(() => {})
+    },
 
-      // 去过程反馈
-      toFeedback(id) {
-        this.$navToPage({
-          url: `/packageWorkorder/pages/processFeedback?id=${id}`
+    // 接单
+    actionReceive(id) {
+      this.$modal({
+        title: '接单确认',
+        content: '确认接单?'
+      }).then(() => {
+        this.$api.post('/pg/order/base/rece', {
+          orderBaseId: id,
+        }).then(res => {
+          this.$successToast();
+          this.refreshList();
         })
-      },
+      }).catch(() => {})
+    },
 
-      toDetail(id) {
+    // 去收费
+    toCharge(id, type) {
+      if (type=="M") {
         this.$navToPage({
-          url: `/packageWorkorder/pages/orderDetail?id=${id}`
+          url: `/packageMaterial/pages/sale/index?type=${type}`
+        })
+      } else if (type=="P"){
+        this.$navToPage({
+          url: `/packageMaterial/pages/newSale/index?type=${type}`
         })
-      },
+      }
     },
-  }
 
-  // #endif
-  // #ifndef H5
-  export default {
-    data() {
-      return {
-        pam: {},
-      }
+    // 去过程反馈
+    toFeedback(id) {
+      this.$navToPage({
+        url: `/packageWorkorder/pages/processFeedback?id=${id}`
+      })
+    },
+
+    toDetail(id) {
+      this.$navToPage({
+        url: `/packageWorkorder/pages/orderDetail?id=${id}`
+      })
     },
-    onLoad(pam) {
-      this.pam = pam;
+  },
+}
+
+// #endif
+// #ifndef H5
+export default {
+  data() {
+    return {
+      pam: {},
     }
+  },
+  onLoad(pam) {
+    this.pam = pam;
   }
-  // #endif
+}
+// #endif
 </script>
 
 <style lang="scss" scoped>
 .search-container {
-  background: #FFFFFF;
+  background: #ffffff;
   padding: 0 20rpx 20rpx;
 }
 

+ 45 - 0
src/pages.json

@@ -955,6 +955,51 @@
             "navigationBarTitleText": "支付结果"
           }
         },
+
+        {
+          "path": "pages/newSale/index",
+          "style": {
+            "navigationBarTitleText": "辅材收款"
+          }
+        },
+        {
+          "path": "pages/newSale/product",
+          "style": {
+            "navigationBarTitleText": "选择产品"
+          }
+        },
+        {
+          "path": "pages/newSale/orderList",
+          "style": {
+            "navigationBarTitleText": "订单列表"
+          }
+        },
+        {
+          "path": "pages/newSale/orderDetail",
+          "style": {
+            "navigationBarTitleText": "订单详情",
+            "navigationBarBackgroundColor": "#C8E0FB"
+          }
+        },
+        {
+          "path": "pages/newSale/order",
+          "style": {
+            "navigationBarTitleText": "确认订单"
+          }
+        },
+        {
+          "path": "pages/newSale/pay",
+          "style": {
+            "navigationBarTitleText": "确认支付"
+          }
+        },
+        {
+          "path": "pages/newSale/result",
+          "style": {
+            "navigationBarTitleText": "支付结果"
+          }
+        },
+
         {
           "path": "pages/partsApply/form",
           "style": {

+ 1 - 1
src/pages/index/index.vue

@@ -341,7 +341,7 @@ export default {
         // 其他列表
         { code: 1, title: '我的库存', url: `/packageMaterial/pages/stock/index` },
         { code: 2, title: '辅材收款', url: `/packageMaterial/pages/sale/index?type=M` },
-        { code: 3, title: '配件收款', url: `/packageMaterial/pages/sale/index?type=P` }
+        { code: 3, title: '配件收款', url: `/packageMaterial/pages/newSale/index?type=P` }
       ],
       bannerList: [], // 轮播图列表
       couponList: [], // 可领取优惠券列表

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio