Ver Fonte

no message

linwenxin há 8 meses atrás
pai
commit
1bd2eda8a5
62 ficheiros alterados com 8887 adições e 1761 exclusões
  1. 106 0
      src/components/popup.vue
  2. 82 0
      src/components/searchInput.vue
  3. 27 0
      src/components/tag.vue
  4. 49 0
      src/components/zj-page-container/zj-page-container.vue
  5. 96 0
      src/components/zj-page-container/zj-page-fill.vue
  6. 508 0
      src/packageAttachment/pages/applicationParts/applicationPartsForm.vue
  7. 288 0
      src/packageAttachment/pages/applicationParts/confirmOrder.vue
  8. 257 0
      src/packageAttachment/pages/applicationParts/index.nvue
  9. 432 0
      src/packageAttachment/pages/applicationParts/orderPayment.vue
  10. 144 0
      src/packageAttachment/pages/applicationParts/state.vue
  11. 486 0
      src/packageAttachment/pages/applyReturnOfNewPiece/index.vue
  12. 118 0
      src/packageAttachment/pages/applyReturnOfNewPiece/state.vue
  13. 80 0
      src/packageAttachment/pages/beyondInsuranceTransferToSale/card.vue
  14. 235 0
      src/packageAttachment/pages/beyondInsuranceTransferToSale/index.vue
  15. 281 0
      src/packageAttachment/pages/fittingsManagement/index.vue
  16. 70 0
      src/packageAttachment/pages/forwardSaleOrder/card.vue
  17. 111 0
      src/packageAttachment/pages/forwardSaleOrder/details.vue
  18. 205 0
      src/packageAttachment/pages/forwardSaleOrder/index.vue
  19. 81 0
      src/packageAttachment/pages/orderOfSales/card.vue
  20. 295 0
      src/packageAttachment/pages/orderOfSales/details.vue
  21. 244 0
      src/packageAttachment/pages/orderOfSales/index.vue
  22. 86 0
      src/packageAttachment/pages/returnOfNewParts/card.vue
  23. 324 0
      src/packageAttachment/pages/returnOfNewParts/details.vue
  24. 238 0
      src/packageAttachment/pages/returnOfNewParts/index.vue
  25. 80 0
      src/packageAttachment/pages/returnOfOldParts/card.vue
  26. 319 0
      src/packageAttachment/pages/returnOfOldParts/details.vue
  27. 235 0
      src/packageAttachment/pages/returnOfOldParts/index.vue
  28. 148 0
      src/packageAttachment/pages/returnOfOldParts/workOrderView.vue
  29. 60 0
      src/packageAttachment/pages/sparePartsInventory/accessoriesItem.vue
  30. 106 0
      src/packageAttachment/pages/sparePartsInventory/choosingAccessories.vue
  31. 80 0
      src/packageAttachment/pages/sparePartsInventory/choosingAccessoriesItem.vue
  32. 97 0
      src/packageAttachment/pages/sparePartsInventory/index.vue
  33. 159 0
      src/packageAttachment/pages/sparePartsInventory/mixins/getData.js
  34. 79 0
      src/packageAttachment/pages/sparePartsInventory/style/accessories_item.scss
  35. 121 0
      src/packageAttachment/pages/sparePartsInventory/style/style.scss
  36. 355 264
      src/packageGoods/pages/order.vue
  37. 827 812
      src/packageMine/pages/groupbuy/list.vue
  38. 411 404
      src/packageWorkorder/pages/appraise.vue
  39. 149 0
      src/pages.json
  40. 280 281
      src/pages/login/index.vue
  41. 6 0
      src/pages/mine/index.vue
  42. BIN
      src/static/images/fittingsManagement/icon_cg.png
  43. BIN
      src/static/images/fittingsManagement/icon_next.png
  44. BIN
      src/static/images/fittingsManagement/jiajia.png
  45. BIN
      src/static/images/fittingsManagement/jianjian.png
  46. BIN
      src/static/images/fittingsManagement/module_0.png
  47. BIN
      src/static/images/fittingsManagement/module_1.png
  48. BIN
      src/static/images/fittingsManagement/module_2.png
  49. BIN
      src/static/images/fittingsManagement/module_3.png
  50. BIN
      src/static/images/fittingsManagement/module_4.png
  51. BIN
      src/static/images/map_back.png
  52. BIN
      src/static/images/order_call.png
  53. 161 0
      src/static/style/accessories_nfo_card.scss
  54. 127 0
      src/static/style/animation.css
  55. 3 0
      src/static/style/font/iconfont.css
  56. BIN
      src/static/style/font/iconfont.eot
  57. 94 0
      src/static/style/font/iconfont.svg
  58. BIN
      src/static/style/font/iconfont.ttf
  59. BIN
      src/static/style/font/iconfont.woff
  60. BIN
      src/static/style/font/iconfont.woff2
  61. 4 0
      src/static/style/icon-font.css
  62. 143 0
      src/static/style/utils.css

+ 106 - 0
src/components/popup.vue

@@ -0,0 +1,106 @@
+<template>
+  <view :style="{ display: display ? 'block' : 'none', zIndex: zIndex }" @touchmove.stop.prevent="" class="z-popup">
+    <view
+      @tap.stop="maskTap"
+      :style="{ zIndex: zIndex }"
+      @touchmove.stop=""
+      :class="[animation ? 'fade-out' : 'fade-in']"
+      class="mask"
+    ></view>
+    <view v-if="center" :style="{ zIndex: zIndex }" class="z-container">
+      <slot></slot>
+    </view>
+    <view v-else :style="{ zIndex: zIndex }" style="position: relative">
+      <slot></slot>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    value: {
+      type: Boolean,
+      default: false
+    },
+    zIndex: {
+      type: String | Number,
+      default: 10000
+    },
+    canTapMask: {
+      type: Boolean,
+      default: true
+    },
+    center: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      animation: false,
+      display: false
+    }
+  },
+  watch: {
+    value(val, old) {
+      if (val == old) {
+        return
+      }
+      val ? this.enter() : this.hide()
+    }
+  },
+  mounted() {
+    this.display = this.value
+  },
+  methods: {
+    enter() {
+      if (this.display) return
+      this.display = true
+      setTimeout(() => {
+        this.animation = false
+      }, 250)
+    },
+    maskTap() {
+      if (this.canTapMask) {
+        this.$emit('input', false)
+      }
+    },
+    hide() {
+      if (!this.display) return
+      new Promise(reslove => {
+        this.animation = true
+        setTimeout(() => {
+          this.animation = false
+          this.display = false
+          reslove()
+        }, 250)
+      }).then(() => {
+        this.$emit('input', false)
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.z-popup {
+  position: fixed;
+
+  .mask {
+    @include flex_abc;
+    height: 100vh;
+    width: 100%;
+  }
+
+  .z-container {
+    top: 50%;
+    left: 50%;
+    transform: translate3d(-50%, -50%, 0);
+    position: fixed;
+    max-height: 80vh;
+    // overflow-y: auto;
+    // margin-top: -30rpx;
+  }
+}
+</style>

+ 82 - 0
src/components/searchInput.vue

@@ -0,0 +1,82 @@
+<template>
+  <view class="flex_ac" style="height: 88rpx; width: 100%">
+    <view class="input-con">
+      <image src="/static/image/matser/search.png" mode=""></image>
+      <input
+        @input="keychange"
+        v-model="keyvalue"
+        @confirm="confirm"
+        confirm-type="search"
+        class="f28_302"
+        type="text"
+        placeholder="请输入"
+        placeholder-style="color:#CCCCCC"
+      />
+      <view class="cancel-btn">
+        <text @click="search">搜索</text>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    value: ''
+  },
+  data() {
+    return {
+      keyvalue: ''
+    }
+  },
+  methods: {
+    keychange(e) {
+      this.$emit('input', e)
+    },
+    confirm(e) {
+      this.$emit('search', e.detail.value)
+    },
+    search() {
+      this.$emit('search', this.keyvalue)
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.input-con {
+  @include flex_ac;
+  flex: 1;
+  padding: 0 0 0 24rpx;
+  height: 64rpx;
+  background: #f7f7f7;
+  border-radius: 32rpx;
+
+  input {
+    flex: 1;
+  }
+  .cancel-btn {
+    width: 66px;
+    height: 32px;
+    background: #6da7ff;
+    border-radius: 16px;
+    text-align: center;
+    text {
+      width: 27px;
+      height: 14px;
+      font-size: 14px;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: center;
+      color: #ffffff;
+      line-height: 30px;
+    }
+  }
+
+  image {
+    width: 28rpx;
+    height: 28rpx;
+    margin-right: 16rpx;
+  }
+}
+</style>

+ 27 - 0
src/components/tag.vue

@@ -0,0 +1,27 @@
+<template>
+  <view class="tag">
+    <slot></slot>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {}
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.tag {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 60rpx;
+  height: 32rpx;
+  border-radius: 8rpx;
+  margin-left: 10rpx;
+  color: #ffffff;
+  font-size: 18rpx;
+}
+</style>

+ 49 - 0
src/components/zj-page-container/zj-page-container.vue

@@ -0,0 +1,49 @@
+<template>
+  <view
+    :class="{
+      'zj-page-container': true,
+      'zj-page-container-row': direction === 'row',
+      'zj-page-container-column': direction === 'column'
+    }"
+    :style="{
+      width: width,
+      height: height
+    }"
+  >
+    <slot></slot>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'ZjPageContainer',
+  props: {
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '100%'
+    },
+    direction: {
+      type: String,
+      default: 'column'
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.zj-page-container {
+  display: flex;
+}
+
+.zj-page-container-row {
+  flex-direction: row;
+}
+
+.zj-page-container-column {
+  flex-direction: column;
+}
+</style>

+ 96 - 0
src/components/zj-page-container/zj-page-fill.vue

@@ -0,0 +1,96 @@
+<template>
+  <view :class="['zj-page-fill', zjPageFillClass]">
+    <view class="zj-page-fill-absolute">
+      <template v-if="scroll">
+        <scroll-view
+          class="zj-page-fill-scroll"
+          scroll-y
+          enable-flex
+          v-bind="scrollAttribute"
+          @scrolltoupper="
+            (...p) => {
+              $emit('scrolltoupper', p)
+            }
+          "
+          @scrolltolower="
+            (...p) => {
+              $emit('scrolltolower', p)
+            }
+          "
+          @scroll="
+            (...p) => {
+              $emit('scroll', p)
+            }
+          "
+          @refresherpulling="
+            (...p) => {
+              $emit('refresherpulling', p)
+            }
+          "
+          @refresherrefresh="
+            (...p) => {
+              $emit('refresherrefresh', p)
+            }
+          "
+          @refresherrestore="
+            (...p) => {
+              $emit('refresherrestore', p)
+            }
+          "
+          @refresherabort="
+            (...p) => {
+              $emit('refresherabort', p)
+            }
+          "
+        >
+          <slot></slot>
+        </scroll-view>
+      </template>
+      <template v-else>
+        <slot></slot>
+      </template>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'ZjPageFill',
+  props: {
+    scroll: {
+      type: Boolean,
+      default: true
+    },
+    scrollAttribute: {
+      type: Object,
+      default: () => ({})
+    },
+    zjPageFillClass: {
+      type: String,
+      default: ''
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.zj-page-fill {
+  flex: 1;
+  overflow: hidden;
+  position: relative;
+
+  .zj-page-fill-absolute {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+  }
+
+  .zj-page-fill-scroll {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+  }
+}
+</style>

+ 508 - 0
src/packageAttachment/pages/applicationParts/applicationPartsForm.vue

@@ -0,0 +1,508 @@
+<template>
+  <view class="apply-return-of-new-piece" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view v-if="form">
+          <view class="input_module">
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 申请人 </view>
+              <view class="input_module_as_en">
+                {{ userInfo.username }}
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 所属网点 </view>
+              <view class="input_module_as_en"> {{ form.shopName }} ({{ form.partsWebsiteNumber }}) </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> *申请类别 </view>
+              <view class="input_module_as_en">
+                <radio-group
+                  @change="
+                    d => {
+                      form.applyCategoryValue = d.detail.value
+                    }
+                  "
+                >
+                  <label style="margin-right: 20upx">
+                    <radio value="HOME" :checked="form.applyCategoryValue === 'HOME'" />家用空调
+                  </label>
+                  <label> <radio value="TRADE" :checked="form.applyCategoryValue === 'TRADE'" />商用空调 </label>
+                  <br />
+                  <br />
+                  <label>
+                    <radio value="ELEC" :checked="form.applyCategoryValue === 'ELEC'" />生活电器(小家电)
+                  </label>
+                </radio-group>
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> *申请类型 </view>
+              <view class="input_module_as_en">
+                <radio-group
+                  @change="
+                    d => {
+                      form.applyType = d.detail.value
+                    }
+                  "
+                >
+                  <label style="margin-right: 20upx">
+                    <radio value="0" :checked="form.applyType === '0'" />普通申请
+                  </label>
+                  <label> <radio value="1" :checked="form.applyType === '1'" />急件申请 </label>
+                  <br />
+                  <br />
+                  <label> <radio value="2" :checked="form.applyType === '2'" />备件申请 </label>
+                </radio-group>
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> *发货方式 </view>
+              <view class="input_module_as_en">
+                <radio-group
+                  @change="
+                    d => {
+                      form.deliveryType = d.detail.value
+                    }
+                  "
+                >
+                  <label style="margin-right: 20upx">
+                    <radio value="0" :checked="form.deliveryType === '0'" />快递
+                  </label>
+                  <label> <radio value="1" :checked="form.deliveryType === '1'" />自提 </label>
+                </radio-group>
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 发出单位 </view>
+              <view class="input_module_as_en">
+                <input
+                  disabled
+                  v-model="form.deliveryUnit"
+                  style="width: 100%; height: 100%; margin-top: -6upx"
+                  placeholder="请输入"
+                />
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 接收单位 </view>
+              <view class="input_module_as_en">
+                <input
+                  disabled
+                  v-model="form.receiveUnit"
+                  style="width: 100%; height: 100%; margin-top: -6upx"
+                  placeholder="请输入"
+                />
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 收货地址 </view>
+              <view class="input_module_as_en">
+                <input
+                  v-model="form.receiveAddr"
+                  style="width: 100%; height: 100%; margin-top: -6upx"
+                  placeholder="请输入"
+                />
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 详细地址 </view>
+              <view class="input_module_as_en">
+                <input v-model="form.addr" style="width: 100%; height: 100%; margin-top: -6upx" placeholder="请输入" />
+              </view>
+            </view>
+          </view>
+          <view class="input_module" v-if="form.itemList">
+            <view class="input_module_title">
+              <text>配件信息</text>
+              <text class="input_title_smbtn" @tap.stop="goToChoosingAccessories"> 添加配件</text>
+            </view>
+            <view class="input_module_content">
+              <view class="input_module_apply_info">
+                <block v-for="(item, index) in form.itemList" :key="index">
+                  <view class="input_module_apply_view">
+                    <view class="input_module_apply_title">
+                      <view>
+                        {{ item.partsName }}
+                      </view>
+                      <text class="input_module_apply_del" @tap.stop="delItem(index)">删除</text>
+                    </view>
+                    <view class="input_module_apply_num">
+                      <text class="input_module_apply_number">{{ item.partsNumber }}</text>
+                      <view class="input_module_apply_amount">
+                        <text class="apply_amount"> ¥{{ Math.round(item.salesPrice * 100) / 100 }} </text>
+                        <view class="input_module_apply_counter">
+                          <image
+                            @tap="setQty(item, -1)"
+                            src="/static/images/fittingsManagement/jianjian.png"
+                            mode="aspectFill"
+                          ></image>
+                          <text>{{ item.quantity }}</text>
+                          <image
+                            @tap="setQty(item, 1)"
+                            src="/static/images/fittingsManagement//jiajia.png"
+                            mode="aspectFill"
+                          ></image>
+                        </view>
+                      </view>
+                    </view>
+                  </view>
+                </block>
+                <view class="a_combined_sc">
+                  合计:<text
+                    >¥{{
+                      [
+                        ...(form.itemList || []).map(item => Math.round(item.salesPrice * item.quantity * 100) / 100),
+                        0
+                      ].reduce((a, b) => {
+                        return a + b
+                      })
+                    }}</text
+                  >
+                </view>
+              </view>
+            </view>
+          </view>
+          <view class="input_module">
+            <view class="input_module_title">
+              <text>备注</text>
+            </view>
+            <view class="input_module_content">
+              <view class="input_remark">
+                <textarea
+                  v-model="form.remark"
+                  style="width: 100%; height: 100%"
+                  :maxlength="1000"
+                  placeholder-style="color:#999999"
+                  placeholder="请输入备注"
+                />
+              </view>
+            </view>
+          </view>
+        </view>
+      </zj-page-fill>
+      <bt-container>
+        <view class="btcon pv30 ph10">
+          <view class="confirm-btn" @tap.stop="save">提交申请</view>
+        </view>
+      </bt-container>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill
+  },
+  data() {
+    return {
+      form: null,
+      option: {}
+    }
+  },
+  onLoad(option) {
+    this.option = option
+    this.form = {
+      ...option,
+      itemList: [],
+      deliveryUnit: this.option.shopName,
+      identity: this.userInfo.idCard,
+      mobile: this.userInfo.mobile,
+      receiveUnit: this.userInfo.username,
+      workerId: this.userInfo.number,
+      workerName: this.userInfo.username,
+      belongCompany: this.userInfo.belong_company,
+      websiteName: this.userInfo.websit_worker.websit_name,
+      websiteNumber: this.userInfo.websit_worker.websit_number
+    }
+    console.log(this.userInfo)
+    uni.$on('getAccessoriesItem', data => {
+      var { id, ...item } = data
+      this.form.itemList.push({
+        ...item,
+        quantity: 1
+      })
+    })
+  },
+  onUnload() {
+    uni.$off('getAccessoriesItem')
+  },
+  computed: {
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  methods: {
+    goToChoosingAccessories() {
+      this.$navToPage({
+        url: `/packageAttachment/pages/sparePartsInventory/choosingAccessories?apiType=applicationParts&shopId=${this.option.shopId}&shopName=${this.option.shopName}&partsWebsiteNumber=${this.option.partsWebsiteNumber}`
+      })
+    },
+    delItem(index) {
+      this.form.itemList.splice(index, 1)
+    },
+    save() {
+      if (~['', undefined].indexOf(this.form.applyCategoryValue)) {
+        uni.showModal({
+          title: '提示',
+          content: '必须选择申请类别',
+          showCancel: false
+        })
+        return
+      }
+      if (~['', undefined].indexOf(this.form.applyType)) {
+        uni.showModal({
+          title: '提示',
+          content: '必须选择申请类型',
+          showCancel: false
+        })
+        return
+      }
+      if (~['', undefined].indexOf(this.form.deliveryType)) {
+        uni.showModal({
+          title: '提示',
+          content: '必须选择发货方式',
+          showCancel: false
+        })
+        return
+      }
+      if (!this.form.itemList.length) {
+        uni.showModal({
+          title: '提示',
+          content: '必须添加配件',
+          showCancel: false
+        })
+        return
+      }
+      //
+      this.$api
+        .post('/app/worker/parts-sales/add', this.form)
+        .then(res => {
+          if (res.code === 1) {
+            uni.redirectTo({
+              url: `/packageAttachment/pages/applicationParts/confirmOrder?id=${res.data.id}`
+            })
+          } else {
+            uni.showModal({
+              title: '提示',
+              content: res.message,
+              showCancel: false
+            })
+          }
+        })
+        .catch(() => {})
+    },
+    setQty(item, num) {
+      var n = Number(item.quantity) + Number(num)
+      if (n > 0 && n <= item.newQty) {
+        item.quantity = n
+      } else if (num == -1) {
+        uni.showModal({
+          title: '提示',
+          content: '数量不能小于1',
+          showCancel: false
+        })
+      } else if (num == 1) {
+        uni.showModal({
+          title: '提示',
+          content: '数量不能大于库存',
+          showCancel: false
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.apply-return-of-new-piece {
+  .input_module {
+    background: #ffffff;
+    margin-bottom: 20upx;
+
+    .input_module_as {
+      width: 100%;
+      height: auto;
+      display: flex;
+      flex-direction: row;
+      flex-wrap: nowrap;
+      justify-content: space-between;
+
+      .input_module_as_title {
+        width: 200upx;
+        min-width: 200upx;
+        height: 88upx;
+        text-align: left;
+        font-size: 28upx;
+        font-family: PingFang SC, PingFang SC-Medium;
+        font-weight: 500;
+        text-align: left;
+        color: #333333;
+        line-height: 28upx;
+        box-sizing: border-box;
+        padding: 30upx;
+      }
+
+      .input_module_as_en {
+        width: 100%;
+        box-sizing: border-box;
+        padding: 30upx 30upx 30upx 0;
+      }
+    }
+
+    .input_module_title {
+      width: 100%;
+      box-sizing: border-box;
+      padding: 20upx 30upx;
+      font-size: 16px;
+      font-family: PingFang SC, PingFang SC-Heavy;
+      font-weight: 800;
+      text-align: left;
+      color: #333333;
+      line-height: 24px;
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      align-items: center;
+
+      .input_title_smbtn {
+        font-weight: 400;
+        color: #e95505;
+      }
+    }
+
+    .input_module_content {
+      width: 100%;
+      box-sizing: border-box;
+      padding: 0 30upx 20upx;
+    }
+
+    .input_remark,
+    .input_module_apply_info {
+      width: 100%;
+      height: auto;
+      background: #f7f7f7;
+      border-radius: 20upx;
+      box-sizing: border-box;
+      padding: 20upx;
+    }
+
+    .input_module_apply_view {
+      margin-bottom: 20upx;
+
+      .input_module_apply_title {
+        width: 100%;
+        font-family: PingFang SC, PingFang SC-Medium;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        flex-wrap: nowrap;
+        margin-bottom: 20upx;
+
+        view {
+          width: 100%;
+          font-size: 28upx;
+          font-weight: 500;
+          text-align: left;
+          color: #333333;
+          line-height: 60upx;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+
+        .input_module_apply_del {
+          width: 120upx;
+          min-width: 120upx;
+          font-size: 24upx;
+          color: red;
+          text-align: right;
+          line-height: 60upx;
+        }
+      }
+
+      .input_module_apply_num {
+        width: 100%;
+        box-sizing: border-box;
+        padding-bottom: 20upx;
+        border-bottom: 1upx solid #e5e5e5;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+
+        .input_module_apply_number {
+          font-size: 28upx;
+          font-family: PingFang SC, PingFang SC-Medium;
+          font-weight: 500;
+          text-align: left;
+          color: #666666;
+        }
+
+        .input_module_apply_amount {
+          width: 50%;
+          display: flex;
+          justify-content: flex-end;
+          align-items: center;
+
+          .apply_amount {
+            font-size: 28upx;
+            font-family: PingFang SC, PingFang SC-Medium;
+            font-weight: 500;
+            text-align: right;
+            color: #333333;
+          }
+
+          .input_module_apply_counter {
+            width: 45%;
+            margin-left: 20upx;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+
+            text {
+              font-size: 30upx;
+              font-family: PingFang SC, PingFang SC-Heavy;
+              font-weight: bold;
+              text-align: center;
+              color: #333333;
+            }
+
+            image {
+              width: 40upx;
+              min-width: 40upx;
+              height: 40upx;
+              min-height: 40upx;
+            }
+          }
+        }
+      }
+    }
+
+    .a_combined_sc {
+      width: 100%;
+      text-align: right;
+      font-size: 28upx;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: right;
+      color: #666666;
+
+      text {
+        font-size: 32upx;
+        font-family: PingFang SC, PingFang SC-Heavy;
+        font-weight: bold;
+        text-align: right;
+        color: #e95505;
+      }
+    }
+  }
+}
+</style>

+ 288 - 0
src/packageAttachment/pages/applicationParts/confirmOrder.vue

@@ -0,0 +1,288 @@
+<template>
+  <view style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view class="accessories_nfo_card_view" v-if="info">
+          <view class="input_module">
+            <view class="input_module_title">
+              <text>配件信息</text>
+            </view>
+            <view class="input_module_content">
+              <view class="input_module_apply_info">
+                <block v-for="(item, index) in info.itemList || []" :key="index">
+                  <view class="input_module_apply_view">
+                    <view class="input_module_apply_title">
+                      <view>
+                        {{ item.partsName }}
+                      </view>
+                    </view>
+                    <view class="input_module_apply_num">
+                      <text class="input_module_apply_number">{{ item.partsNumber }}</text>
+                      <view class="input_module_apply_amount">
+                        <view class="input_module_apply_counter">
+                          <text>*{{ item.quantity }}</text>
+                        </view>
+                        <text class="apply_amount"> ¥{{ Math.round(item.marketPrice * 1.2 * 100) / 100 }} </text>
+                      </view>
+                    </view>
+                  </view>
+                </block>
+                <view class="a_combined_sc">
+                  合计:<text
+                    >¥{{
+                      [
+                        ...(info.itemList || []).map(
+                          item => Math.round(item.marketPrice * 1.2 * item.quantity * 100) / 100
+                        ),
+                        0
+                      ].reduce((a, b) => {
+                        return a + b
+                      })
+                    }}</text
+                  >
+                </view>
+              </view>
+            </view>
+          </view>
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请人: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.workerName }}({{ info.workerId }}) </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 类型: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ ['普通申请', '急件申请', '备件申请'][info.applyType] }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 网点: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.websiteName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 备注信息: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.remark }}
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+      </zj-page-fill>
+      <bt-container v-if="info">
+        <view class="btcon pv30 ph10">
+          <view class="confirm-btn" @tap.stop="submit">提交订单</view>
+        </view>
+      </bt-container>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill
+  },
+  data() {
+    return {
+      info: null
+    }
+  },
+  onLoad: function (option) {
+    this.getDetails(option)
+  },
+  methods: {
+    getDetails(option) {
+      this.$api
+        .get('/app/worker/parts-sales/loadSalesOrderById', option)
+        .then(res => {
+          this.info = res.data
+        })
+        .catch(() => {})
+    },
+    submit() {
+      this.$api
+        .get('/app/worker/parts-sales/submit', {
+          id: this.info.id
+        })
+        .then(res => {
+          if (res.code === 1) {
+            uni.redirectTo({
+              url: `/packageAttachment/pages/applicationParts/orderPayment?id=${res.data.id}`
+            })
+          } else {
+            uni.showModal({
+              title: '提示',
+              content: res.message,
+              showCancel: false
+            })
+          }
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+
+.input_module {
+  background: #ffffff;
+  margin-bottom: 20upx;
+  border-radius: 20upx;
+
+  .input_module_title {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 20upx 30upx;
+    font-size: 16px;
+    font-family: PingFang SC, PingFang SC-Heavy;
+    font-weight: 800;
+    text-align: left;
+    color: #333333;
+    line-height: 24px;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+  }
+
+  .input_module_content {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 0 30upx 20upx;
+  }
+
+  .input_remark,
+  .input_module_apply_info {
+    width: 100%;
+    height: auto;
+    background: #f7f7f7;
+    border-radius: 20upx;
+    box-sizing: border-box;
+    padding: 20upx;
+  }
+
+  .input_module_apply_view {
+    margin-bottom: 20upx;
+
+    .input_module_apply_title {
+      width: 100%;
+      font-family: PingFang SC, PingFang SC-Medium;
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      flex-wrap: nowrap;
+      margin-bottom: 20upx;
+
+      view {
+        width: 100%;
+        font-size: 28upx;
+        font-weight: 500;
+        text-align: left;
+        color: #333333;
+        line-height: 60upx;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+
+      .input_module_apply_del {
+        width: 120upx;
+        min-width: 120upx;
+        font-size: 24upx;
+        color: red;
+        text-align: right;
+        line-height: 60upx;
+      }
+    }
+
+    .input_module_apply_num {
+      width: 100%;
+      box-sizing: border-box;
+      padding-bottom: 20upx;
+      border-bottom: 1upx solid #e5e5e5;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+
+      .input_module_apply_number {
+        font-size: 28upx;
+        font-family: PingFang SC, PingFang SC-Medium;
+        font-weight: 500;
+        text-align: left;
+        color: #666666;
+      }
+
+      .input_module_apply_amount {
+        width: 50%;
+        display: flex;
+        justify-content: flex-end;
+        align-items: center;
+
+        .apply_amount {
+          font-size: 28upx;
+          font-family: PingFang SC, PingFang SC-Medium;
+          font-weight: 500;
+          text-align: right;
+          color: #333333;
+        }
+
+        .input_module_apply_counter {
+          width: 45%;
+          margin-left: 20upx;
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+
+          text {
+            font-size: 30upx;
+            font-family: PingFang SC, PingFang SC-Heavy;
+            font-weight: bold;
+            text-align: center;
+            color: #333333;
+          }
+
+          image {
+            width: 40upx;
+            min-width: 40upx;
+            height: 40upx;
+            min-height: 40upx;
+          }
+        }
+      }
+    }
+  }
+
+  .a_combined_sc {
+    width: 100%;
+    text-align: right;
+    font-size: 28upx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: right;
+    color: #666666;
+
+    text {
+      font-size: 32upx;
+      font-family: PingFang SC, PingFang SC-Heavy;
+      font-weight: bold;
+      text-align: right;
+      color: #e95505;
+    }
+  }
+}
+</style>

+ 257 - 0
src/packageAttachment/pages/applicationParts/index.nvue

@@ -0,0 +1,257 @@
+<template>
+	<view class="s_page">
+		<map class="myMap" :latitude="latitude" :longitude="longitude" :markers="markers" style="width: 750rpx;flex: 1;"
+			scale="11"></map>
+		<!-- 左上角返回按钮 -->
+		<image @tap.stop='navBack' class="map-back" src="/static/images/map_back.png" mode=""
+			:style="{top:StatusBar+'px'}"></image>
+		<!-- 申请记录按钮 -->
+		<view class="record-application" @tap.stop="toNavigate" :style="{top:StatusBar+'px'}">
+			<text class="record-application-text">申请记录</text>
+		</view>
+		<!-- 列表 -->
+		<view class="bottom-con">
+			<list @loadmore="loadMore" loadmoreoffset="20" show-scrollbar>
+				<cell class="item" v-for="item in websitList" :key="item.shopId">
+					<view class="mb20 flex_abs mt20">
+						<text class="fw600 f32_302">{{item.shopName}}</text>
+						<text class="f24_999">距离{{(item.distance)}}km</text>
+					</view>
+					<view class="flex_abs">
+						<text class="f28_666" style="width: 520rpx;">地址:{{item.address}}</text>
+						<tag
+							style="width: 150rpx;height: 50rpx;background-image: linear-gradient(to bottom right, #7FDAFF, #6DA7FF);border-radius: 30rpx;">
+							<text @tap.stop="toApplicationPartsForm(item)" class="f24_FFF">申请</text>
+						</tag>
+					</view>
+				</cell>
+			</list>
+		</view>
+	</view>
+</template>
+
+<script>
+	const sysInfo = uni.getSystemInfoSync();
+import api from '@/common/http/'
+	import tag from '@/components/tag.vue';
+	export default {
+		components: {
+			tag
+		},
+		data() {
+			return {
+				StatusBar: sysInfo.statusBarHeight,
+				latitude: '',
+				longitude: '',
+				markers: [{
+					id: 'm_1',
+					latitude: 23.183466,
+					longitude: 113.35709,
+					iconPath: '/static/images/order_call.png'
+				}],
+				websitList: [],
+				page: 1,
+				pageSize: 3,
+				websit_number: ""
+			};
+		},
+		async onLoad() {
+			const getWebsit_number = uni.getStorageSync("userInfo")
+			this.websit_number = getWebsit_number.websit_number
+			await this.getCurrentWebsit()
+			await this.getWebsitList()
+		},
+		methods: {
+			navBack() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			toNavigate() {
+				this.$navToPage({
+					url: `/packageAttachment/pages/orderOfSales/index`
+				})
+			},
+			toApplicationPartsForm(item) {
+				var {
+					shopId,
+					shopName,
+					partsWebsiteNumber
+				} = item
+				this.$navToPage({
+					url: `/packageAttachment/pages/applicationParts/applicationPartsForm?shopId=${shopId}&shopName=${shopName}&partsWebsiteNumber=${partsWebsiteNumber}`
+				})
+			},
+			loadMore() {
+				this.page++
+				this.getWebsitList()
+			},
+			getWebsitList() {
+				let params = {
+					latitude: this.latitude,
+					longitude: this.longitude,
+					pageNo: this.page,
+					pageSize: this.pageSize,
+					websiteNumber: this.websit_number
+				}
+				api.get('/app/buy/websit/list',params).then(res => {
+					this.websitList = this.websitList.concat(res.data.records).filter(item => (item
+						.partsWebsiteNumber))
+					if (this.websitList.length != 0) {
+						this.markers = this.websitList.map(item => {
+							return {
+								id: item.shopId,
+								latitude: item.latitude,
+								longitude: item.longitude,
+								width: 28,
+								height: 28,
+								fontSize: 16,
+								iconPath: '',
+								callout: {
+									content: item.shopName,
+									padding: 5,
+									display: 'ALWAYS',
+									borderRadius: 5,
+									color: '#E95505'
+								}
+							}
+						})
+					}
+				})
+			},
+			async getCurrentWebsit() {
+				const addressInfo = await new Promise((resolve, reject) => {
+					uni.getLocation({
+						type: 'gcj02',
+						geocode: true,
+						success: res => {
+							resolve({
+								lat: res.latitude,
+								lng: res.longitude,
+								address: res.address
+							})
+						},
+						fail: err => {
+							reject(err)
+						}
+					})
+				});
+				let {
+					lat,
+					lng
+				} = addressInfo
+				this.latitude = lat
+				this.longitude = lng
+			}
+		}
+
+	}
+</script>
+
+<style scoped lang="scss">
+	.confirm-btn {
+		background-image: linear-gradient(to bottom right, #7FDAFF, #6DA7FF);
+	}
+
+	.map-back {
+		position: absolute;
+		left: 30rpx;
+		width: 60rpx;
+		height: 60rpx;
+		border-radius: 30rpx;
+		overflow: hidden;
+	}
+
+	.record-application {
+		position: absolute;
+		right: 30rpx;
+		width: auto;
+		height: 60rpx;
+		border-radius: 30rpx;
+		box-sizing: border-box;
+		padding: 0 20rpx;
+		background: #6DA7FF;
+	}
+
+	.record-application-text {
+		font-size: 28rpx;
+		font-weight: 500;
+		text-align: center;
+		color: #ffffff !important;
+		line-height: 60rpx;
+	}
+
+	.bottom-con {
+		width: 750rpx;
+		padding-top: 25rpx;
+		padding-left: 25rpx;
+		padding-bottom: 30rpx;
+		padding-right: 25rpx;
+		// border-radius: 40rpx;
+		border-top-right-radius: 40rpx;
+		border-top-left-radius: 40rpx;
+		// box-shadow: 0px -10rpx 40rpx 0px rgba(0, 0, 0, 0.05);
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		background-color: #FFFFFF;
+		z-index: 100;
+		// overflow:hidden;
+		height: 500rpx;
+	}
+
+	.item {
+		background-color: #FFFFFF;
+		overflow: hidden;
+		border-bottom: 2rpx solid #F7F7F7;
+		padding-bottom: 20rpx;
+	}
+
+	.flex_abs {
+		flex-direction: row;
+	}
+
+	.mask {
+		position: fixed;
+		left: 0;
+		top: 0;
+		bottom: 0;
+		right: 0;
+		background-color: rgba(0, 0, 0, 0.3);
+		z-index: 1000;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.closes {
+		flex-direction: row;
+		justify-content: flex-end;
+	}
+
+	.closes-img {
+		height: 40rpx;
+		width: 40rpx;
+	}
+
+	.phone-con {
+		width: 540rpx;
+		border-radius: 20rpx;
+		background-color: #ffffff;
+		text-align: center;
+		padding: 10rpx 30rpx 40rpx 30rpx;
+		position: relative;
+
+		.confirm-btn {
+			font-size: 32rpx;
+			color: #FFFFFF;
+		}
+
+		.iconfont {
+			color: #E5E5E5;
+			position: absolute;
+			right: 30rpx;
+			top: 30rpx;
+			color: #333333;
+		}
+	}
+</style>

+ 432 - 0
src/packageAttachment/pages/applicationParts/orderPayment.vue

@@ -0,0 +1,432 @@
+<template>
+  <view style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view class="accessories_nfo_card_view" v-if="info">
+          <view class="input_module">
+            <view class="input_module_title">
+              <text>配件信息</text>
+            </view>
+            <view class="input_module_content">
+              <view class="input_module_apply_info">
+                <block v-for="(item, index) in info.itemList || []" :key="index">
+                  <view class="input_module_apply_view">
+                    <view class="input_module_apply_title">
+                      <view>
+                        {{ item.partsName }}
+                      </view>
+                    </view>
+                    <view class="input_module_apply_num">
+                      <text class="input_module_apply_number">{{ item.partsNumber }}</text>
+                      <view class="input_module_apply_amount">
+                        <view class="input_module_apply_counter">
+                          <text>*{{ item.quantity }}</text>
+                        </view>
+                        <text class="apply_amount"> ¥{{ Math.round(item.marketPrice * 1.2 * 100) / 100 }} </text>
+                      </view>
+                    </view>
+                  </view>
+                </block>
+                <view class="a_combined_sc">
+                  合计:<text
+                    >¥{{
+                      [
+                        ...(info.itemList || []).map(
+                          item => Math.round(item.marketPrice * 1.2 * item.quantity * 100) / 100
+                        ),
+                        0
+                      ].reduce((a, b) => {
+                        return a + b
+                      })
+                    }}</text
+                  >
+                </view>
+              </view>
+            </view>
+          </view>
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请人: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.workerName }}({{ info.workerId }}) </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 类型: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ ['普通申请', '急件申请', '备件申请'][info.applyType] }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 网点: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.websiteName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 备注信息: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.remark }}
+                </view>
+              </view>
+            </view>
+          </view>
+          <view class="input_module">
+            <view class="input_module_title">
+              <text>支付方式</text>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 微信支付: </view>
+              <view class="input_module_as_en">
+                <radio value="0" disabled :checked="true" />
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 支付网点: </view>
+              <view class="input_module_as_en">
+                <view class="picker-view">
+                  <picker
+                    class="picker-select"
+                    @change="bindPickerChange"
+                    :value="index"
+                    :range="shopList"
+                    range-key="name"
+                  >
+                    <view class="picker-select-input">
+                      {{ shopList[index] ? shopList[index].name : '请选择' }}
+                    </view>
+                  </picker>
+                  <image
+                    class="icon_next"
+                    src="/static/images/fittingsManagement/icon_next.png"
+                    mode="aspectFill"
+                  ></image>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+      </zj-page-fill>
+      <bt-container v-if="info">
+        <view class="btcon pv30 ph10">
+          <!-- abcdef -->
+          <!-- <view class="confirm-btn" style="background:#9f9f9f;" @tap.stop="quxiao">取消</view>
+					<view class=""  style="width:40upx;">
+					</view> -->
+          <view class="confirm-btn" @tap.stop="submit">支付</view>
+        </view>
+      </bt-container>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill
+  },
+  data() {
+    return {
+      info: null,
+      option: {},
+      shopList: [],
+      index: 0,
+      bool: false
+    }
+  },
+  onLoad: function (option) {
+    this.option = option
+    this.getDetails()
+  },
+  onShow: function () {
+    if (this.bool) {
+      uni.redirectTo({
+        url: `/packageAttachment/pages/applicationParts/state?id=${this.option.id}`
+      })
+    }
+  },
+  methods: {
+    quxiao() {},
+    // 获取网点
+    getShopInfo(shopId) {
+      this.$api
+        .get('/app/online/pay-config-list', {
+          shopId: shopId,
+          category: 'P'
+        })
+        .then(res => {
+          this.shopList = res.data
+        })
+        .catch(() => {
+          this.shopList = []
+        })
+    },
+    // 监听下拉选项
+    bindPickerChange(e) {
+      this.index = e.detail.value
+    },
+    getDetails() {
+      this.$api
+        .get('/app/worker/parts-sales/loadSalesOrderById', this.option)
+        .then(res => {
+          this.getShopInfo(res.data.shopId)
+          this.info = res.data
+        })
+        .catch(() => {})
+    },
+    submit() {
+      this.$api
+        .postJson('/app/online/save/sheet-pay-map', {
+          payId: this.shopList[this.index].id,
+          sheetId: this.info.salesOrderNo
+        })
+        .then(res => {
+          if (res.data.code) {
+            setTimeout(() => {
+              this.bool = true
+            }, 1500)
+            plus.runtime.openURL(res.data.code)
+          }
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+
+.abcdef {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  justify-content: flex-end;
+  align-items: center;
+}
+
+.picker-view {
+  width: 100%;
+  height: 58rpx;
+  border: 1rpx solid #e5e5e5;
+  border-radius: 8rpx;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  box-sizing: border-box;
+  padding: 0rpx 12rpx;
+
+  .picker-select {
+    width: 100%;
+    height: 100%;
+
+    .picker-select-input {
+      width: 100%;
+      height: 100%;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      line-height: 56rpx;
+      font-size: 12px;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      color: #333333;
+    }
+  }
+
+  .icon_next {
+    width: 24rpx;
+    height: 24rpx;
+    min-width: 24rpx;
+    min-height: 24rpx;
+    margin-left: 12rpx;
+  }
+}
+
+.input_module {
+  background: #ffffff;
+  margin-bottom: 20upx;
+  border-radius: 20upx;
+
+  .input_module_as {
+    width: 100%;
+    height: auto;
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+
+    .input_module_as_title {
+      width: 200upx;
+      min-width: 200upx;
+      height: 88upx;
+      text-align: left;
+      font-size: 28upx;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: left;
+      color: #333333;
+      line-height: 28upx;
+      box-sizing: border-box;
+      padding: 30upx;
+    }
+
+    .input_module_as_en {
+      width: 100%;
+      box-sizing: border-box;
+      padding: 30upx 30upx 30upx 0;
+    }
+  }
+
+  .input_module_title {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 20upx 30upx;
+    font-size: 16px;
+    font-family: PingFang SC, PingFang SC-Heavy;
+    font-weight: 800;
+    text-align: left;
+    color: #333333;
+    line-height: 24px;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+  }
+
+  .input_module_content {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 0 30upx 20upx;
+  }
+
+  .input_remark,
+  .input_module_apply_info {
+    width: 100%;
+    height: auto;
+    background: #f7f7f7;
+    border-radius: 20upx;
+    box-sizing: border-box;
+    padding: 20upx;
+  }
+
+  .input_module_apply_view {
+    margin-bottom: 20upx;
+
+    .input_module_apply_title {
+      width: 100%;
+      font-family: PingFang SC, PingFang SC-Medium;
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      flex-wrap: nowrap;
+      margin-bottom: 20upx;
+
+      view {
+        width: 100%;
+        font-size: 28upx;
+        font-weight: 500;
+        text-align: left;
+        color: #333333;
+        line-height: 60upx;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+
+      .input_module_apply_del {
+        width: 120upx;
+        min-width: 120upx;
+        font-size: 24upx;
+        color: red;
+        text-align: right;
+        line-height: 60upx;
+      }
+    }
+
+    .input_module_apply_num {
+      width: 100%;
+      box-sizing: border-box;
+      padding-bottom: 20upx;
+      border-bottom: 1upx solid #e5e5e5;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+
+      .input_module_apply_number {
+        font-size: 28upx;
+        font-family: PingFang SC, PingFang SC-Medium;
+        font-weight: 500;
+        text-align: left;
+        color: #666666;
+      }
+
+      .input_module_apply_amount {
+        width: 50%;
+        display: flex;
+        justify-content: flex-end;
+        align-items: center;
+
+        .apply_amount {
+          font-size: 28upx;
+          font-family: PingFang SC, PingFang SC-Medium;
+          font-weight: 500;
+          text-align: right;
+          color: #333333;
+        }
+
+        .input_module_apply_counter {
+          width: 45%;
+          margin-left: 20upx;
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+
+          text {
+            font-size: 30upx;
+            font-family: PingFang SC, PingFang SC-Heavy;
+            font-weight: bold;
+            text-align: center;
+            color: #333333;
+          }
+
+          image {
+            width: 40upx;
+            min-width: 40upx;
+            height: 40upx;
+            min-height: 40upx;
+          }
+        }
+      }
+    }
+  }
+
+  .a_combined_sc {
+    width: 100%;
+    text-align: right;
+    font-size: 28upx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: right;
+    color: #666666;
+
+    text {
+      font-size: 32upx;
+      font-family: PingFang SC, PingFang SC-Heavy;
+      font-weight: bold;
+      text-align: right;
+      color: #e95505;
+    }
+  }
+}
+</style>

+ 144 - 0
src/packageAttachment/pages/applicationParts/state.vue

@@ -0,0 +1,144 @@
+<template>
+  <view class="apply-return-of-new-piece-state" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view class="piece_state_info" v-if="state">
+          <image class="icon_cg" src="/static/images/fittingsManagement/icon_cg.png" mode="aspectFill"> </image>
+          <view class="piece_state_ts"> 支付成功 </view>
+          <view class="piece_state_text"> 请及时在网点领取您申请的配件 </view>
+          <view class="piece_state_text"> 若网点配件不足时,可能无法领取 </view>
+        </view>
+      </zj-page-fill>
+      <view class="backbtnclick">
+        <view class="confirm-btn" @tap.stop="goto4">返回配件管理</view>
+      </view>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill
+  },
+  data() {
+    return {
+      option: {},
+      state: false
+    }
+  },
+  computed: {
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  onLoad: function (option) {
+    this.option = option
+    uni.showLoading({
+      title: '等待结果'
+    })
+    this.getDetails()
+  },
+  methods: {
+    getDetails() {
+      this.$api
+        .get('/app/worker/parts-sales/loadSalesOrderById', this.option)
+        .then(res => {
+          if (res.data.payFlag === 1) {
+            this.state = true
+            uni.hideLoading()
+          } else {
+            setTimeout(() => {
+              this.getDetails()
+            }, 1000)
+          }
+          this.getShopInfo(res.data.shopId)
+          this.info = res.data
+        })
+        .catch(() => {})
+    },
+    goto4() {
+      if (!this.state) {
+        uni.hideLoading()
+      }
+      uni.navigateBack({
+        delta: 2
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.apply-return-of-new-piece-state {
+  background: #fff;
+
+  .piece_state_info {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-start;
+    align-items: center;
+    box-sizing: border-box;
+    padding-top: 86upx;
+
+    .icon_cg {
+      width: 248upx;
+      height: 248upx;
+    }
+
+    .piece_state_ts {
+      font-size: 40upx;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: center;
+      color: #333333;
+      line-height: 40upx;
+      margin-bottom: 40upx;
+    }
+
+    .piece_state_text {
+      font-size: 28upx;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: center;
+      color: #333333;
+      line-height: 32upx;
+    }
+
+    .confirm-btn-a {
+      margin-top: 64upx;
+      border-radius: 40upx;
+      border: 1px solid #999999;
+      width: 60%;
+      height: 80upx !important;
+      background: #fff !important;
+      color: #666666;
+      font-size: 32upx;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: center;
+      line-height: 78upx;
+    }
+  }
+
+  .backbtnclick {
+    width: 100%;
+    height: 200upx;
+
+    .confirm-btn {
+      margin: auto;
+      width: 60%;
+      background: linear-gradient(135deg, #7fdaff 0%, #6da7ff 100%) !important;
+    }
+  }
+}
+</style>

+ 486 - 0
src/packageAttachment/pages/applyReturnOfNewPiece/index.vue

@@ -0,0 +1,486 @@
+<template>
+  <view class="apply-return-of-new-piece" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view v-if="form">
+          <view class="input_module">
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 申请人 </view>
+              <view class="input_module_as_en"> {{ form.applyStuffName }}({{ form.applyStuffNumber }}) </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 所属网点 </view>
+              <view class="input_module_as_en"> {{ form.websiteName }} ({{ form.websiteNumber }}) </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> *申请类别 </view>
+              <view class="input_module_as_en">
+                <radio-group
+                  @change="
+                    d => {
+                      form.applyCategory = d.detail.value
+                    }
+                  "
+                >
+                  <label style="margin-right: 20upx">
+                    <radio value="HOME" :checked="form.applyCategory === 'HOME'" />家用空调
+                  </label>
+                  <label> <radio value="TRADE" :checked="form.applyCategory === 'TRADE'" />商用空调 </label>
+                  <br />
+                  <br />
+                  <label> <radio value="ELEC" :checked="form.applyCategory === 'ELEC'" />生活电器(小家电) </label>
+                </radio-group>
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> *申请类型 </view>
+              <view class="input_module_as_en">
+                <radio-group
+                  @change="
+                    d => {
+                      form.applyType = d.detail.value
+                    }
+                  "
+                >
+                  <label style="margin-right: 20upx">
+                    <radio value="NEW" :checked="form.applyType === 'NEW'" />新件返还
+                  </label>
+                  <label> <radio value="LOST" :checked="form.applyType === 'LOST'" />破损返还 </label>
+                  <br />
+                  <br />
+                  <label> <radio value="BUG" :checked="form.applyType === 'BUG'" />故障返还 </label>
+                </radio-group>
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> *返还方式 </view>
+              <view class="input_module_as_en">
+                <radio-group
+                  @change="
+                    d => {
+                      form.refundMode = d.detail.value
+                    }
+                  "
+                >
+                  <label style="margin-right: 20upx">
+                    <radio value="EXPRESS" :checked="form.refundMode === 'EXPRESS'" />物流快递
+                  </label>
+                  <label> <radio value="SELF" :checked="form.refundMode === 'SELF'" />网点自还 </label>
+                </radio-group>
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 发出单位 </view>
+              <view class="input_module_as_en">
+                {{ form.deliveryUnit }}
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 接收单位 </view>
+              <view class="input_module_as_en">
+                {{ form.receiveUnit }}
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 收货地址 </view>
+              <view class="input_module_as_en">
+                <input
+                  v-model="form.receiveAddr"
+                  style="width: 100%; height: 100%; margin-top: -6upx"
+                  placeholder="请输入"
+                />
+              </view>
+            </view>
+            <view class="input_module_as">
+              <view class="input_module_as_title"> 详细地址 </view>
+              <view class="input_module_as_en">
+                <input v-model="form.addr" style="width: 100%; height: 100%; margin-top: -6upx" placeholder="请输入" />
+              </view>
+            </view>
+          </view>
+          <view class="input_module" v-if="form.itemList && form.itemList.length">
+            <view class="input_module_title">
+              <text>配件信息</text>
+            </view>
+            <view class="input_module_content">
+              <view class="input_module_apply_info">
+                <block v-for="(item, index) in form.itemList" :key="index">
+                  <view class="input_module_apply_view">
+                    <view class="input_module_apply_title">
+                      {{ item.partsName }}
+                    </view>
+                    <view class="input_module_apply_num">
+                      <text class="input_module_apply_number">{{ item.partsNumber }}</text>
+                      <view class="input_module_apply_amount">
+                        <text class="apply_amount"> ¥{{ Math.round(item.salesPrice * 100) / 100 }} </text>
+                        <view class="input_module_apply_counter">
+                          <image
+                            @tap="setQty(item, -1)"
+                            src="/static/images/fittingsManagement/jianjian.png"
+                            mode="aspectFill"
+                          ></image>
+                          <text>{{ item.qty }}</text>
+                          <image
+                            @tap="setQty(item, 1)"
+                            src="/static/images/fittingsManagement//jiajia.png"
+                            mode="aspectFill"
+                          ></image>
+                        </view>
+                      </view>
+                    </view>
+                  </view>
+                </block>
+                <view class="a_combined_sc">
+                  合计:<text
+                    >¥{{
+                      [
+                        ...(form.itemList || []).map(item => Math.round(item.salesPrice * item.qty * 100) / 100),
+                        0
+                      ].reduce((a, b) => {
+                        return a + b
+                      })
+                    }}</text
+                  >
+                </view>
+              </view>
+            </view>
+          </view>
+          <view class="input_module">
+            <view class="input_module_title">
+              <text>备注</text>
+            </view>
+            <view class="input_module_content">
+              <view class="input_remark">
+                <textarea
+                  v-model="form.remark"
+                  style="width: 100%; height: 100%"
+                  :maxlength="1000"
+                  placeholder-style="color:#999999"
+                  placeholder="请输入备注"
+                />
+              </view>
+            </view>
+          </view>
+        </view>
+      </zj-page-fill>
+      <bt-container>
+        <view class="btcon pv30 ph10">
+          <view class="confirm-btn" @tap.stop="toStateUrl">提交申请</view>
+        </view>
+      </bt-container>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill
+  },
+  data() {
+    return {
+      form: null
+    }
+  },
+  onLoad(option) {
+    var { salesOrderNo, pushFlag, identity } = option
+    this.getDetails({
+      salesOrderNo,
+      pushFlag,
+      identity
+    })
+  },
+  computed: {
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  methods: {
+    toStateUrl() {
+      var newRefundManageItemBeanList = (this.form.itemList || [])
+        .filter(item => item.qty > 0)
+        .map(item => {
+          var { qty, materialGroupId, materialGroupName, partsName, partsNumber, unitId, unitName } = item
+          return {
+            qty,
+            materialGroupId,
+            materialGroupName,
+            partsName,
+            partsNumber,
+            unitId,
+            unitName
+          }
+        })
+      if (!newRefundManageItemBeanList || !newRefundManageItemBeanList.length) {
+        uni.showModal({
+          title: '提示',
+          content: '至少选择一条配件记录',
+          showCancel: false
+        })
+        return
+      }
+      if (!this.form.applyType) {
+        uni.showModal({
+          title: '提示',
+          content: '申请类型必须选择',
+          showCancel: false
+        })
+        return
+      }
+      if (!this.form.refundMode) {
+        uni.showModal({
+          title: '提示',
+          content: '返还方式必须选择',
+          showCancel: false
+        })
+        return
+      }
+      if (!this.form.applyCategory) {
+        uni.showModal({
+          title: '提示',
+          content: '申请类别必须选择',
+          showCancel: false
+        })
+        return
+      }
+      var {
+        id,
+        salesOrderNo,
+        applyCategory,
+        applyType,
+        refundMode,
+        belongCompany,
+        websiteName,
+        websiteNumber,
+        workerId,
+        workerName,
+        remark
+      } = this.form
+      var data = {
+        salesOrderId: id,
+        salesOrderNo,
+        applyCategory,
+        applyType,
+        refundMode,
+        belongCompany,
+        websiteName,
+        websiteNumber,
+        workerId,
+        workerName,
+        remark,
+        newRefundManageItemBeanList,
+        receiveShopId: this.form.shopId,
+        receiveShopName: this.form.shopName,
+        receivePartsWebsiteNumber: this.form.partsWebsiteNumber,
+        receiveAddress: this.form.receiveAddr,
+        identity: this.idcard
+      }
+      this.$api
+        .postJson('/app/worker/new-refund/add', data)
+        .then(res => {
+          uni.$emit('DataStatisticsOfParts')
+          this.$navToPage({
+            url: '/packageAttachment/pages/applyReturnOfNewPiece/state'
+          })
+        })
+        .catch(() => {})
+    },
+    getDetails(params) {
+      this.$api
+        .get('/app/worker/parts-sales/detail', params)
+        .then(res => {
+          if (res.data.itemList && res.data.itemList.length) {
+            res.data.itemList.map(item => {
+              item.qty = item.quantity
+            })
+          }
+          this.form = res.data
+        })
+        .catch(() => {})
+    },
+    setQty(item, num) {
+      var n = Number(item.qty) + Number(num)
+      if (n >= 0 && n <= item.quantity) {
+        item.qty = n
+      } else if (num == -1) {
+        uni.showModal({
+          title: '提示',
+          content: '数量不能小于0',
+          showCancel: false
+        })
+      } else if (num == 1) {
+        uni.showModal({
+          title: '提示',
+          content: '数量不能大于库存',
+          showCancel: false
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.apply-return-of-new-piece {
+  .input_module {
+    background: #ffffff;
+    margin-bottom: 20upx;
+
+    .input_module_as {
+      width: 100%;
+      height: auto;
+      display: flex;
+      flex-direction: row;
+      flex-wrap: nowrap;
+      justify-content: space-between;
+
+      .input_module_as_title {
+        width: 200upx;
+        min-width: 200upx;
+        height: 88upx;
+        text-align: left;
+        font-size: 28upx;
+        font-family: PingFang SC, PingFang SC-Medium;
+        font-weight: 500;
+        text-align: left;
+        color: #333333;
+        line-height: 28upx;
+        box-sizing: border-box;
+        padding: 30upx;
+      }
+
+      .input_module_as_en {
+        width: 100%;
+        box-sizing: border-box;
+        padding: 30upx 30upx 30upx 0;
+      }
+    }
+
+    .input_module_title {
+      width: 100%;
+      box-sizing: border-box;
+      padding: 20upx 30upx;
+      font-size: 16px;
+      font-family: PingFang SC, PingFang SC-Heavy;
+      font-weight: 800;
+      text-align: left;
+      color: #333333;
+      line-height: 24px;
+    }
+
+    .input_module_content {
+      width: 100%;
+      box-sizing: border-box;
+      padding: 0 30upx 20upx;
+    }
+
+    .input_remark,
+    .input_module_apply_info {
+      width: 100%;
+      height: auto;
+      background: #f7f7f7;
+      border-radius: 20upx;
+      box-sizing: border-box;
+      padding: 20upx;
+    }
+
+    .input_module_apply_view {
+      margin-bottom: 20upx;
+
+      .input_module_apply_title {
+        width: 100%;
+        font-size: 14px;
+        font-family: PingFang SC, PingFang SC-Medium;
+        font-weight: 500;
+        text-align: left;
+        color: #333333;
+        line-height: 60upx;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+
+      .input_module_apply_num {
+        width: 100%;
+        box-sizing: border-box;
+        padding-bottom: 20upx;
+        border-bottom: 1upx solid #e5e5e5;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+
+        .input_module_apply_number {
+          font-size: 28upx;
+          font-family: PingFang SC, PingFang SC-Medium;
+          font-weight: 500;
+          text-align: left;
+          color: #666666;
+        }
+
+        .input_module_apply_amount {
+          width: 50%;
+          display: flex;
+          justify-content: flex-end;
+          align-items: center;
+
+          .apply_amount {
+            font-size: 28upx;
+            font-family: PingFang SC, PingFang SC-Medium;
+            font-weight: 500;
+            text-align: right;
+            color: #333333;
+          }
+
+          .input_module_apply_counter {
+            width: 45%;
+            margin-left: 20upx;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+
+            text {
+              font-size: 30upx;
+              font-family: PingFang SC, PingFang SC-Heavy;
+              font-weight: bold;
+              text-align: center;
+              color: #333333;
+            }
+
+            image {
+              width: 40upx;
+              min-width: 40upx;
+              height: 40upx;
+              min-height: 40upx;
+            }
+          }
+        }
+      }
+    }
+
+    .a_combined_sc {
+      width: 100%;
+      text-align: right;
+      font-size: 28upx;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: right;
+      color: #666666;
+
+      text {
+        font-size: 32upx;
+        font-family: PingFang SC, PingFang SC-Heavy;
+        font-weight: bold;
+        text-align: right;
+        color: #e95505;
+      }
+    }
+  }
+}
+</style>

+ 118 - 0
src/packageAttachment/pages/applyReturnOfNewPiece/state.vue

@@ -0,0 +1,118 @@
+<template>
+  <view class="apply-return-of-new-piece-state" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view class="piece_state_info">
+          <image class="icon_cg" src="/static/images/fittingsManagement/icon_cg.png" mode="aspectFill"> </image>
+          <view class="piece_state_ts"> 新件返还申请已成功提交 </view>
+          <view class="piece_state_text"> 请耐心等待网点对您的申请审核审 </view>
+          <view class="piece_state_text"> 核通过后,您可以归还新件了! </view>
+          <!-- <view class="confirm-btn-a">查看详情</view> -->
+        </view>
+      </zj-page-fill>
+      <view class="backbtnclick">
+        <view class="confirm-btn" @tap.stop="goto4">返回配件管理</view>
+      </view>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill
+  },
+  data() {
+    return {}
+  },
+  computed: {
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  onLoad() {
+    console.log(this.userInfo)
+  },
+  methods: {
+    goto4() {
+      uni.navigateBack({
+        delta: 4
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.apply-return-of-new-piece-state {
+  background: #fff;
+
+  .piece_state_info {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-start;
+    align-items: center;
+    box-sizing: border-box;
+    padding-top: 86upx;
+
+    .icon_cg {
+      width: 248upx;
+      height: 248upx;
+    }
+
+    .piece_state_ts {
+      font-size: 40upx;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: center;
+      color: #333333;
+      line-height: 40upx;
+      margin-bottom: 40upx;
+    }
+
+    .piece_state_text {
+      font-size: 28upx;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: center;
+      color: #333333;
+      line-height: 32upx;
+    }
+
+    .confirm-btn-a {
+      margin-top: 64upx;
+      border-radius: 40upx;
+      border: 1px solid #999999;
+      width: 60%;
+      height: 80upx !important;
+      background: #fff !important;
+      color: #666666;
+      font-size: 32upx;
+      font-family: PingFang SC, PingFang SC-Medium;
+      font-weight: 500;
+      text-align: center;
+      line-height: 78upx;
+    }
+  }
+
+  .backbtnclick {
+    width: 100%;
+    height: 200upx;
+
+    .confirm-btn {
+      margin: auto;
+      width: 60%;
+      background: linear-gradient(135deg, #7fdaff 0%, #6da7ff 100%) !important;
+    }
+  }
+}
+</style>

+ 80 - 0
src/packageAttachment/pages/beyondInsuranceTransferToSale/card.vue

@@ -0,0 +1,80 @@
+<template>
+  <view class="accessories_nfo_card" @tap.stop="toUrl">
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 维修工单号: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.workOrderNo }}
+        </view>
+      </view>
+      <view class="accessories_nfo_title colorts">
+        {{ item.flagName }}
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 配件名称: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.partsName }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 配件数量: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.qty }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 订单金额: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.totalAmount }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 网点: </view>
+      <view class="accessories_nfo_info">
+        <view> {{ item.websiteName }}({{ item.websiteNumber }}) </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 备注: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.remark }}
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    item: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  computed: {
+    info() {
+      return this.item.partsOldRefundManageRecordList[0] || {}
+    }
+  },
+  methods: {
+    toUrl() {
+      this.$navToPage({
+        url: `/packageAttachment/pages/returnOfOldParts/details?applyNo=${this.item.applyNo}`
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 235 - 0
src/packageAttachment/pages/beyondInsuranceTransferToSale/index.vue

@@ -0,0 +1,235 @@
+<template>
+  <view class="return_of_parts" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <view class="list_info_state">
+        <scroll-view scroll-x="true" class="scroll">
+          <view class="box" v-for="(item, index) in stateList" :key="index" @tap.stop="stateIndex = index">
+            <view
+              :class="{
+                selectox: stateIndex === index
+              }"
+              >{{ item.name }}</view
+            >
+            <view v-if="stateIndex === index" class="xhxh"></view>
+          </view>
+        </scroll-view>
+      </view>
+      <zj-page-fill
+        @scrolltolower="carScrolltolower"
+        @refresherrefresh="carRefresherrefresh"
+        @refresherrestore="carRefresherrestore"
+        :scrollAttribute="{
+          'refresher-enabled': true,
+          'refresher-triggered': refresherTriggered
+        }"
+      >
+        <view class="list_view_lay">
+          <block v-for="(item, index) in list" :key="index">
+            <card :item="item" />
+          </block>
+        </view>
+      </zj-page-fill>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import card from './card.vue'
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill,
+    card
+  },
+  data() {
+    return {
+      stateList: [
+        {
+          name: '全部',
+          num: 0,
+          type: ''
+        },
+        {
+          name: '已保存',
+          num: 0,
+          type: 'SAVE'
+        },
+        {
+          name: '已提交',
+          num: 0,
+          type: 'SUBMIT'
+        },
+        {
+          name: '通过',
+          num: 0,
+          type: 'AGREE'
+        },
+        {
+          name: '驳回',
+          num: 0,
+          type: 'REJECT'
+        },
+        {
+          name: '已返还',
+          num: 0,
+          type: 'REFUNDED'
+        }
+      ],
+      stateIndex: 0,
+      // 下拉刷新状态
+      refresherTriggered: false,
+      redcbol: false,
+      pageNo: 1,
+      pageSize: 20,
+      list: [],
+      partsNumber: '',
+      isMore: true
+    }
+  },
+  onLoad: function (option) {
+    this.partsNumber = option.partsNumber || ''
+    this.redc(true)
+    uni.$on('updataReturnOfOldPartsList', () => {
+      if (this.list.length % this.pageSize > 0) {
+        this.redc(true, parseInt(this.list.length / this.pageSize) + this.pageSize)
+      } else {
+        this.redc(true, parseInt(this.list.length / this.pageSize))
+      }
+    })
+  },
+  onUnload() {
+    uni.$off('updataReturnOfOldPartsList')
+  },
+  computed: {
+    stateType() {
+      return this.stateList[this.stateIndex].type
+    },
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  watch: {
+    stateType(newv) {
+      this.redc(true)
+    }
+  },
+  methods: {
+    // 获取新件返还管理列表
+    getList(pageSize) {
+      this.$api
+        .get('/app/worker/old-refund/list', {
+          repairFlag: 'OUTSIDE',
+          pageNo: this.pageNo,
+          pageSize: pageSize || this.pageSize,
+          identity: this.idcard,
+          partsNumber: this.partsNumber,
+          flag: this.stateType
+        })
+        .then(res => {
+          if (pageSize) {
+            if (res.data.records.length % this.pageSize > 0) {
+              this.pageNo = parseInt(res.data.records.length / this.pageSize) + 1
+            } else {
+              this.pageNo = parseInt(res.data.records.length / this.pageSize)
+            }
+            if (res.data.records.length < pageSize) {
+              this.isMore = false
+            }
+          } else if (res.data.records.length < this.pageSize) {
+            this.isMore = false
+          }
+          if (this.refresherTriggered || this.redcbol) {
+            this.list = res.data.records
+            this.refresherTriggered = false
+            this.redcbol = false
+          } else {
+            this.list = [...this.list, ...res.data.records]
+          }
+        })
+        .catch(() => {
+          if (this.refresherTriggered) {
+            this.list = []
+            this.refresherTriggered = false
+          }
+        })
+    },
+    // 滚动到底部
+    carScrolltolower(e) {
+      if (this.isMore) {
+        this.pageNo++
+        this.getList()
+      }
+    },
+    // 触发下拉刷新
+    carRefresherrefresh(e) {
+      this.refresherTriggered = true
+      this.redc()
+    },
+    // 切换更新数据
+    redc(v, size) {
+      this.redcbol = v
+      this.isMore = true
+      this.pageNo = 1
+      this.getList(size)
+    },
+    // 下拉刷新结束
+    carRefresherrestore(e) {}
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.return_of_parts {
+  .list_info_state {
+    width: 100%;
+    height: 88rpx;
+    box-sizing: border-box;
+    background: #ffffff;
+    position: relative;
+
+    .scroll {
+      width: 100%;
+      overflow: hidden;
+      white-space: nowrap;
+    }
+
+    .box {
+      display: inline-block;
+      width: auto;
+      height: 88upx;
+      margin-right: 30upx;
+      position: relative;
+      line-height: 88upx;
+
+      .xhxh {
+        position: absolute;
+        left: 10%;
+        bottom: 0;
+        width: 80%;
+        height: 6upx;
+        background: #6da7ff;
+      }
+    }
+
+    .selectox {
+      color: #6da7ff;
+    }
+
+    .box:first-child {
+      margin-left: 30upx;
+    }
+  }
+
+  .list_view_lay {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 30upx;
+  }
+}
+</style>

+ 281 - 0
src/packageAttachment/pages/fittingsManagement/index.vue

@@ -0,0 +1,281 @@
+<template>
+  <view class="fittings_management_page">
+    <view class="fittings_management_bg"></view>
+    <view class="fittings_management_scroll">
+      <scroll-view
+        scroll-y="true"
+        :style="{
+          height: '100vh'
+        }"
+        :refresher-enabled="true"
+        :refresher-triggered="refresherTriggered"
+        @refresherrefresh="refresherrefresh"
+        refresher-background="#6DA7FF"
+      >
+        <view class="page_scroll_view">
+          <view class="fittings_management_statistical">
+            <block v-for="(item, index) in fittingsStatisticals" :key="index">
+              <view class="fittings_statistical_view">
+                <view class="fittings_statistical_a">
+                  <text class="fittings_statistical_num">{{ item.num }}</text>
+                  <text class="fittings_statistical_title">{{ item.title }}</text>
+                </view>
+              </view>
+            </block>
+          </view>
+          <view class="fittings_management_module">
+            <block v-for="(item, index) in fittingsModules" :key="index">
+              <view @tap.stop="toUrl(item)" class="fittings_module_a">
+                <image :src="`/static/images/fittingsManagement/module_${item.src}.png`" mode="aspectFill"></image>
+                <text>
+                  {{ item.name }}
+                </text>
+              </view>
+            </block>
+          </view>
+        </view>
+      </scroll-view>
+    </view>
+  </view>
+</template>
+
+<script>
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  data() {
+    return {
+      refresherTriggered: false,
+      fittingsStatisticals: [
+        {
+          num: 0,
+          title: '新件库存'
+        },
+        {
+          num: 0,
+          title: '新件待返还'
+        },
+        {
+          num: 0,
+          title: '新件返还金额'
+        },
+        {
+          num: 0,
+          title: '旧件库存'
+        },
+        {
+          num: 0,
+          title: '旧件待返还'
+        },
+        {
+          num: 0,
+          title: '旧件返还金额'
+        }
+      ],
+      fittingsModules: [
+        // {
+        // 	src: 0,
+        // 	name: "配件申请"
+        // },
+        {
+          src: 1,
+          name: '配件库存',
+          url: '/packageAttachment/pages/sparePartsInventory/index'
+        },
+        {
+          src: 2,
+          name: '新件返还',
+          url: '/packageAttachment/pages/returnOfNewParts/index'
+        },
+        {
+          src: 3,
+          name: '旧件返还',
+          url: '/packageAttachment/pages/returnOfOldParts/index'
+        },
+        {
+          src: 4,
+          name: '转销售单',
+          url: '/packageAttachment/pages/forwardSaleOrder/index'
+        },
+        {
+          src: 4,
+          name: '配件申请',
+          url: '/packageAttachment/pages/applicationParts/index'
+        },
+        {
+          src: 4,
+          name: '配件申请记录',
+          url: '/packageAttachment/pages/orderOfSales/index'
+        },
+        {
+          src: 4,
+          name: '保外转销售',
+          url: '/packageAttachment/pages/beyondInsuranceTransferToSale/index'
+        }
+      ],
+      info: {}
+    }
+  },
+  computed: {
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  onLoad() {
+    uni.$on('DataStatisticsOfParts', () => {
+      this.getInfo()
+    })
+  },
+  onUnload() {
+    uni.$off('DataStatisticsOfParts')
+  },
+  mounted() {
+    this.getInfo()
+  },
+  methods: {
+    refresherrefresh() {
+      this.refresherTriggered = true
+      this.getInfo(() => {
+        this.refresherTriggered = false
+      })
+    },
+    getInfo(cbk) {
+      this.$api
+        .get('/app/parts/stock/query/worker-stock', {
+          identity: this.idcard,
+          websiteNumber: uni.getStorageSync('websit_number')
+        })
+        .then(res => {
+          ;['newQty', 'newRefundQty', 'newRefundAmount', 'oldQty', 'oldRefundQty', 'oldRefundAmount'].forEach(
+            (key, index) => {
+              this.fittingsStatisticals[index].num = res.data[key] || 0
+            }
+          )
+          cbk && cbk()
+        })
+        .catch(err => {
+          console.log(err)
+        })
+    },
+    toUrl({ src, name, url }) {
+      if (url) {
+        this.$navToPage({
+          url
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.fittings_management_page {
+  width: 100%;
+  height: 100%;
+  position: relative;
+
+  .fittings_management_bg {
+    width: 100%;
+    height: 100rpx;
+    background: #6da7ff;
+  }
+
+  .fittings_management_scroll {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+  }
+
+  .page_scroll_view {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 48rpx 30rpx;
+
+    .fittings_management_statistical {
+      width: 100%;
+      height: auto;
+      background: #ffffff;
+      border-radius: 20rpx;
+      overflow: hidden;
+      display: flex;
+      flex-wrap: wrap;
+      margin-bottom: 20rpx;
+
+      .fittings_statistical_view {
+        width: 33.333%;
+        height: 140rpx;
+        box-sizing: border-box;
+        padding: 28rpx;
+
+        &:not(:nth-child(3n + 3)) {
+          border-right: 1rpx solid #f7f7f7;
+        }
+
+        &:nth-child(1),
+        &:nth-child(2),
+        &:nth-child(3) {
+          border-bottom: 1rpx solid #f7f7f7;
+        }
+
+        .fittings_statistical_a {
+          width: 100%;
+          height: 100%;
+          display: flex;
+          flex-direction: column;
+          justify-content: space-between;
+
+          .fittings_statistical_num {
+            font-size: 36rpx;
+            font-family: PingFang SC, PingFang SC-Heavy;
+            font-weight: 800;
+            text-align: left;
+            color: #e95505;
+          }
+
+          .fittings_statistical_title {
+            font-size: 26rpx;
+            font-family: PingFang SC, PingFang SC-Medium;
+            font-weight: 500;
+            text-align: left;
+            color: #333333;
+          }
+        }
+      }
+    }
+
+    .fittings_management_module {
+      width: 100%;
+      height: auto;
+      background: #ffffff;
+      border-radius: 20rpx;
+      box-sizing: border-box;
+      padding: 60rpx 0 0;
+      display: flex;
+      flex-direction: row;
+      flex-wrap: wrap;
+
+      .fittings_module_a {
+        width: 33.333%;
+        height: auto;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+        margin-bottom: 60rpx;
+
+        image {
+          width: 64rpx;
+          height: 64rpx;
+          margin-bottom: 20rpx;
+        }
+      }
+    }
+  }
+}
+</style>

+ 70 - 0
src/packageAttachment/pages/forwardSaleOrder/card.vue

@@ -0,0 +1,70 @@
+<template>
+  <view class="accessories_nfo_card" @tap.stop="toUrl">
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 转销售单号: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.changeSalesNo }}
+        </view>
+      </view>
+      <view class="accessories_nfo_title colorts">
+        {{ item.flagName }}
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 转单时间: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.createTime }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 销售单号: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.salesOrderNo }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 总金额: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.totalAmount }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 网点: </view>
+      <view class="accessories_nfo_info">
+        <view> {{ item.shopName }}({{ item.shopId }}) </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    item: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  data() {
+    return {}
+  },
+  methods: {
+    toUrl() {
+      this.$navToPage({
+        url: `/packageAttachment/pages/forwardSaleOrder/details?changeSalesNo=${this.item.changeSalesNo}`
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 111 - 0
src/packageAttachment/pages/forwardSaleOrder/details.vue

@@ -0,0 +1,111 @@
+<template>
+  <view style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view class="accessories_nfo_card_view" v-if="info">
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title">
+              <text>转销售单信息</text>
+              <text class="colorts">
+                {{ ['待审核', '已经审核', '驳回'][['SUBMIT', 'AGREE', 'REJECT'].indexOf(info.flag)] }}
+              </text>
+            </view>
+            <view class="accessories_nfo_card_title"> 配件费用信息 </view>
+            <view class="accessories_list_card">
+              <view
+                class="accessories_list_a accessories_list_a_ts"
+                v-for="(item, index) in info.partsChangeSalesItemList || []"
+                :key="index"
+              >
+                <view class="accessories_list_a_info">
+                  <view>
+                    {{ item.partsName }}
+                  </view>
+                  <view> </view>
+                  <view> ¥{{ info.totalAmount }} </view>
+                </view>
+              </view>
+            </view>
+          </view>
+          <!-- 申请信息 -->
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title"> 申请信息 </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请人: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.workerName }}({{ info.workerId }}) </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 网点: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.shopName }}({{ info.shopId }}) </view>
+              </view>
+            </view>
+            <template v-if="~['AGREE', 'REJECT'].indexOf(info.flag)">
+              <view class="accessories_nfo_ac">
+                <view class="accessories_nfo_title"> 审批人: </view>
+                <view class="accessories_nfo_info">
+                  <view>
+                    {{ info.examineBy }}
+                  </view>
+                </view>
+              </view>
+              <view class="accessories_nfo_ac">
+                <view class="accessories_nfo_title"> 审批结果: </view>
+                <view class="accessories_nfo_info">
+                  <view>
+                    {{ info.flagName }}
+                  </view>
+                </view>
+              </view>
+              <view class="accessories_nfo_ac">
+                <view class="accessories_nfo_title"> 审批备注: </view>
+                <view class="accessories_nfo_info">
+                  <view>
+                    {{ info.examineRemark }}
+                  </view>
+                </view>
+              </view>
+            </template>
+          </view>
+        </view>
+      </zj-page-fill>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill
+  },
+  data() {
+    return {
+      info: null
+    }
+  },
+  onLoad: function (option) {
+    this.getDetails(option.changeSalesNo)
+  },
+  methods: {
+    getDetails(changeSalesNo) {
+      this.$api
+        .get('/app/worker/change-sales/detail', {
+          changeSalesNo
+        })
+        .then(res => {
+          this.info = res.data
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 205 - 0
src/packageAttachment/pages/forwardSaleOrder/index.vue

@@ -0,0 +1,205 @@
+<template>
+  <view class="return_of_parts" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <view class="list_info_state">
+        <scroll-view scroll-x="true" class="scroll">
+          <view class="box" v-for="(item, index) in stateList" :key="index" @tap.stop="stateIndex = index">
+            <view
+              :class="{
+                selectox: stateIndex === index
+              }"
+              >{{ item.name }}</view
+            >
+            <view v-if="stateIndex === index" class="xhxh"></view>
+          </view>
+        </scroll-view>
+      </view>
+      <zj-page-fill
+        @scrolltolower="carScrolltolower"
+        @refresherrefresh="carRefresherrefresh"
+        @refresherrestore="carRefresherrestore"
+        :scrollAttribute="{
+          'refresher-enabled': true,
+          'refresher-triggered': refresherTriggered
+        }"
+      >
+        <view class="list_view_lay">
+          <block v-for="(item, index) in list" :key="index">
+            <card :item="item" />
+          </block>
+        </view>
+      </zj-page-fill>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import card from './card.vue'
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill,
+    card
+  },
+  data() {
+    return {
+      stateList: [
+        {
+          name: '全部',
+          num: 0,
+          type: ''
+        },
+        {
+          name: '待审核',
+          num: 0,
+          type: 'SUBMIT'
+        },
+        {
+          name: '已经审核',
+          num: 0,
+          type: 'AGREE'
+        },
+        {
+          name: '驳回',
+          num: 0,
+          type: 'REJECT'
+        }
+      ],
+      stateIndex: 0,
+      // 下拉刷新状态
+      refresherTriggered: false,
+      redcbol: false,
+      pageNo: 1,
+      pageSize: 20,
+      list: [],
+      partsNumber: '',
+      isMore: true
+    }
+  },
+  onLoad: function (option) {
+    this.partsNumber = option.partsNumber || ''
+    this.redc(true)
+  },
+  computed: {
+    stateType() {
+      return this.stateList[this.stateIndex].type
+    },
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  watch: {
+    stateType(newv) {
+      this.redc(true)
+    }
+  },
+  methods: {
+    // 获取新件返还管理列表
+    getList() {
+      this.$api
+        .get('/app/worker/change-sales/list', {
+          pageNo: this.pageNo,
+          pageSize: this.pageSize,
+          identity: this.idcard,
+          partsNumber: this.partsNumber,
+          flag: this.stateType
+        })
+        .then(res => {
+          if (res.data.records.length < this.pageSize) {
+            this.isMore = false
+          }
+          if (this.refresherTriggered || this.redcbol) {
+            this.list = res.data.records
+            this.refresherTriggered = false
+            this.redcbol = false
+          } else {
+            this.list = [...this.list, ...res.data.records]
+          }
+        })
+        .catch(() => {
+          if (this.refresherTriggered) {
+            this.list = []
+            this.refresherTriggered = false
+          }
+        })
+    },
+    // 滚动到底部
+    carScrolltolower(e) {
+      if (this.isMore) {
+        this.pageNo++
+        this.getList()
+      }
+    },
+    // 触发下拉刷新
+    carRefresherrefresh(e) {
+      this.refresherTriggered = true
+      this.redc()
+    },
+    // 切换更新数据
+    redc(v) {
+      this.redcbol = v
+      this.isMore = true
+      this.pageNo = 1
+      this.getList()
+    },
+    // 下拉刷新结束
+    carRefresherrestore(e) {}
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.return_of_parts {
+  .list_info_state {
+    width: 100%;
+    height: 88rpx;
+    box-sizing: border-box;
+    background: #ffffff;
+    position: relative;
+
+    .scroll {
+      width: 100%;
+      overflow: hidden;
+      white-space: nowrap;
+    }
+
+    .box {
+      display: inline-block;
+      width: auto;
+      height: 88upx;
+      margin-right: 30upx;
+      position: relative;
+      line-height: 88upx;
+
+      .xhxh {
+        position: absolute;
+        left: 10%;
+        bottom: 0;
+        width: 80%;
+        height: 6upx;
+        background: #6da7ff;
+      }
+    }
+
+    .selectox {
+      color: #6da7ff;
+    }
+
+    .box:first-child {
+      margin-left: 30upx;
+    }
+  }
+
+  .list_view_lay {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 30upx;
+  }
+}
+</style>

+ 81 - 0
src/packageAttachment/pages/orderOfSales/card.vue

@@ -0,0 +1,81 @@
+<template>
+  <view class="accessories_nfo_card" @tap.stop="toUrl">
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 申请单号: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.salesOrderNo }}
+        </view>
+      </view>
+      <view class="accessories_nfo_title colorts">
+        {{ item.stateName }}
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 申请时间: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.createTime }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 总金额: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{
+            [...(item.itemList || []).map(a => Math.round(a.salesPrice * a.quantity * 100) / 100), 0].reduce((a, b) => {
+              return a + b
+            })
+          }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 网点: </view>
+      <view class="accessories_nfo_info">
+        <view> {{ item.websiteName }}({{ item.websiteNumber }}) </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    type: {
+      type: String,
+      default: ''
+    },
+    item: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  data() {
+    return {}
+  },
+  methods: {
+    toUrl() {
+      var { salesOrderNo, pushFlag, identity } = this.item
+      if (this.type === 'entryStock') {
+        this.$navToPage({
+          url: `/packageAttachment/pages/applyReturnOfNewPiece/index?salesOrderNo=${salesOrderNo}&pushFlag=${
+            pushFlag || ''
+          }&identity=${identity}`
+        })
+      } else {
+        this.$navToPage({
+          url: `/packageAttachment/pages/orderOfSales/details?salesOrderNo=${salesOrderNo}&pushFlag=${
+            pushFlag || ''
+          }&identity=${identity}`
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 295 - 0
src/packageAttachment/pages/orderOfSales/details.vue

@@ -0,0 +1,295 @@
+<template>
+  <view style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view class="accessories_nfo_card_view" v-if="info">
+          <!-- 配件信息 -->
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title">
+              <text>配件信息</text>
+              <text class="colorts">
+                {{ info.stateName }}
+              </text>
+            </view>
+            <view class="accessories_list_card" v-if="info.itemList && info.itemList.length">
+              <view class="accessories_list_a" v-for="(item, index) in info.itemList" :key="index">
+                <view class="accessories_list_a_info">
+                  <view>
+                    {{ item.partsName }}
+                  </view>
+                  <view> *{{ item.quantity }} </view>
+                  <view> ¥{{ item.totalAmount }} </view>
+                </view>
+                <view class="accessories_list_a_number">
+                  <text>{{ item.partsNumber }}</text>
+                </view>
+              </view>
+              <view class="accessories_list_amount">
+                合计:<text class="colorts">
+                  ¥{{
+                    [...(info.itemList || []).map(a => a.totalAmount || 0), 0].reduce((a, b) => {
+                      return a + b
+                    })
+                  }}
+                </text>
+              </view>
+            </view>
+            <view class="accessories_nfo_card_title"> 备注信息 </view>
+            <view class="accessories_nfo_card_note">
+              {{ info.remark }}
+            </view>
+          </view>
+          <!-- 申请信息 -->
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title"> 申请信息 </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请单号: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.salesOrderNo }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请日期: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.createTime }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请人: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.workerName }}({{ info.workerId }}) </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 网点: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.websiteName }}({{ info.websiteNumber }}) </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请类别: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.applyCategoryName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请类型: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ ['普通申请', '急件申请', '备件申请'][[0, 1, 2].indexOf(info.applyType)] }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 发货方式: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ ['快递', '自提'][info.deliveryType] }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 支付方式: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ ['现金', '微信', '支付宝', '赊账', '通联'][info.payType] }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 支付金额: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.totalPrice }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 支付时间: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.payTime }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 支付状态: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ ['未支付', '已支付、未提货', '已支付、已提货', '已支付、缺货'][info.payFlag] }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 下单时间: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.createTime }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 微信流水号: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ payInfo('transactionId') }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 提货状态: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.pickupStateName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 领取时间: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.endTime }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 操作人: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.workerName }}
+                </view>
+              </view>
+            </view>
+          </view>
+          <!-- 发货信息 -->
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title"> 发货信息 </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 发货单位: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.deliveryUnit }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 接收单位: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.receiveUnit }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 收货地址: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.receiveAddr }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 详细地址: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.addr }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 物流单号: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.logisticsNo }}
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+      </zj-page-fill>
+      <bt-container v-if="info && ~[2].indexOf(info.state) && !info.workerConfirmDate && info.deliveryType === 0">
+        <view class="btcon pv30 ph10">
+          <view @tap.stop="confirmationDelivery" class="confirm-btn">确认提货 </view>
+        </view>
+      </bt-container>
+      <bt-container v-else-if="info && ~[1].indexOf(info.state) && ~[0].indexOf(info.payFlag)">
+        <view class="btcon pv30 ph10">
+          <view @tap.stop="gopay" class="confirm-btn">去支付 </view>
+        </view>
+      </bt-container>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import popup from '@/components/popup.vue'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill,
+    popup
+  },
+  data() {
+    return {
+      info: null,
+      params: {}
+    }
+  },
+  onLoad(option) {
+    var { salesOrderNo, pushFlag, identity } = option
+    this.params = {
+      salesOrderNo,
+      identity
+    }
+    if (pushFlag) {
+      this.params.pushFlag = pushFlag
+    }
+    this.getDetails()
+  },
+  methods: {
+    gopay() {
+      uni.redirectTo({
+        url: `/packageAttachment/pages/applicationParts/orderPayment?id=${this.info.id}`
+      })
+    },
+    payInfo(key) {
+      if (this.info && this.info.payList && this.info.payList[0]) {
+        return this.info.payList[0][key] || ''
+      }
+      return ''
+    },
+    getDetails(params) {
+      this.$api
+        .get('/app/worker/parts-sales/detail', this.params)
+        .then(res => {
+          this.info = res.data
+        })
+        .catch(() => {})
+    },
+    confirmationDelivery() {
+      this.$api
+        .get('/app/worker/parts-sales/workerConfirmDelivery', {
+          salesOrderNo: this.info.salesOrderNo
+        })
+        .then(res => {
+          uni.$emit('updateOrderOfSales')
+          uni.$emit('DataStatisticsOfParts')
+          this.getDetails()
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 244 - 0
src/packageAttachment/pages/orderOfSales/index.vue

@@ -0,0 +1,244 @@
+<template>
+  <view class="return_of_parts" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <view class="list_info_state">
+        <scroll-view scroll-x="true" class="scroll">
+          <view class="box" v-for="(item, index) in stateList" :key="index" @tap.stop="stateIndex = index">
+            <view
+              :class="{
+                selectox: stateIndex === index
+              }"
+              >{{ item.name }}</view
+            >
+            <view v-if="stateIndex === index" class="xhxh"></view>
+          </view>
+        </scroll-view>
+      </view>
+      <zj-page-fill
+        @scrolltolower="carScrolltolower"
+        @refresherrefresh="carRefresherrefresh"
+        @refresherrestore="carRefresherrestore"
+        :scrollAttribute="{
+          'refresher-enabled': true,
+          'refresher-triggered': refresherTriggered
+        }"
+      >
+        <view class="list_view_lay">
+          <block v-for="(item, index) in list" :key="index">
+            <card :item="item" />
+          </block>
+        </view>
+      </zj-page-fill>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import card from './card.vue'
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill,
+    card
+  },
+  data() {
+    return {
+      stateList: [
+        {
+          name: '全部',
+          num: 0,
+          type: ''
+        },
+        {
+          name: '已保存',
+          num: 0,
+          type: 0
+        },
+        {
+          name: '已提交',
+          num: 0,
+          type: 1
+        },
+        {
+          name: '已支付',
+          num: 0,
+          type: 2
+        },
+        {
+          name: '网点已提货',
+          num: 0,
+          type: 6
+        },
+        {
+          name: '师傅已提货',
+          num: 0,
+          type: 7
+        },
+        {
+          name: '已完成',
+          num: 0,
+          type: 3
+        },
+        {
+          name: '已取消',
+          num: 0,
+          type: 5
+        }
+      ],
+      stateIndex: 0,
+      // 下拉刷新状态
+      refresherTriggered: false,
+      redcbol: false,
+      pageNo: 1,
+      pageSize: 20,
+      list: [],
+      partsNumber: '',
+      isMore: true
+    }
+  },
+  onLoad: function (option) {
+    this.partsNumber = option.partsNumber || ''
+    this.redc(true)
+    uni.$on('updateOrderOfSales', () => {
+      if (this.list.length % this.pageSize > 0) {
+        this.redc(true, parseInt(this.list.length / this.pageSize) + this.pageSize)
+      } else {
+        this.redc(true, parseInt(this.list.length / this.pageSize))
+      }
+    })
+  },
+  onUnload() {
+    uni.$off('updateOrderOfSales')
+  },
+  computed: {
+    stateType() {
+      return this.stateList[this.stateIndex].type
+    },
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  watch: {
+    stateType(newv) {
+      this.redc(true)
+    }
+  },
+  methods: {
+    // 获取新件返还管理列表
+    getList(pageSize) {
+      this.$api
+        .get('/app/worker/parts-sales/list', {
+          pageNo: this.pageNo,
+          pageSize: pageSize || this.pageSize,
+          identity: this.idcard,
+          partsNumber: this.partsNumber,
+          state: this.stateType
+        })
+        .then(res => {
+          if (pageSize) {
+            if (res.data.records.length % this.pageSize > 0) {
+              this.pageNo = parseInt(res.data.records.length / this.pageSize) + 1
+            } else {
+              this.pageNo = parseInt(res.data.records.length / this.pageSize)
+            }
+            if (res.data.records.length < pageSize) {
+              this.isMore = false
+            }
+          } else if (res.data.records.length < this.pageSize) {
+            this.isMore = false
+          }
+          if (this.refresherTriggered || this.redcbol) {
+            this.list = res.data.records
+            this.refresherTriggered = false
+            this.redcbol = false
+          } else {
+            this.list = [...this.list, ...res.data.records]
+          }
+        })
+        .catch(() => {
+          if (this.refresherTriggered) {
+            this.list = []
+            this.refresherTriggered = false
+          }
+        })
+    },
+    // 滚动到底部
+    carScrolltolower(e) {
+      if (this.isMore) {
+        this.pageNo++
+        this.getList()
+      }
+    },
+    // 触发下拉刷新
+    carRefresherrefresh(e) {
+      this.refresherTriggered = true
+      this.redc()
+    },
+    // 切换更新数据
+    redc(v, size) {
+      this.redcbol = v
+      this.isMore = true
+      this.pageNo = 1
+      this.getList(size)
+    },
+    // 下拉刷新结束
+    carRefresherrestore(e) {}
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.return_of_parts {
+  .list_info_state {
+    width: 100%;
+    height: 88rpx;
+    box-sizing: border-box;
+    background: #ffffff;
+    position: relative;
+
+    .scroll {
+      width: 100%;
+      overflow: hidden;
+      white-space: nowrap;
+    }
+
+    .box {
+      display: inline-block;
+      width: auto;
+      height: 88upx;
+      margin-right: 30upx;
+      position: relative;
+      line-height: 88upx;
+
+      .xhxh {
+        position: absolute;
+        left: 10%;
+        bottom: 0;
+        width: 80%;
+        height: 6upx;
+        background: #6da7ff;
+      }
+    }
+
+    .selectox {
+      color: #6da7ff;
+    }
+
+    .box:first-child {
+      margin-left: 30upx;
+    }
+  }
+
+  .list_view_lay {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 30upx;
+  }
+}
+</style>

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

@@ -0,0 +1,86 @@
+<template>
+  <view class="accessories_nfo_card" @tap.stop="toUrl">
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 购买编号: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.salesOrderNo }}
+        </view>
+      </view>
+      <view class="accessories_nfo_title colorts">
+        {{ item.flagName }}
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 配件编号: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.partsNumber }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 配件名称: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.partsName }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 配件数量: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.qty }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 网点: </view>
+      <view class="accessories_nfo_info">
+        <view> {{ item.websiteName }}({{ item.websiteNumber }}) </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 备注: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.remark }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac" v-if="item.expireDay">
+      <view class="accessories_nfo_title"> 提示: </view>
+      <view class="accessories_nfo_info">
+        <view> {{ item.expireDay }}日内需返还 </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    item: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  computed: {
+    info() {
+      return this.item.newRefundManageItemBeanList[0] || {}
+    }
+  },
+  methods: {
+    toUrl() {
+      this.$navToPage({
+        url: `/packageAttachment/pages/returnOfNewParts/details?applyNo=${this.item.applyNo}`
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 324 - 0
src/packageAttachment/pages/returnOfNewParts/details.vue

@@ -0,0 +1,324 @@
+<template>
+  <view style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view class="accessories_nfo_card_view" v-if="info">
+          <!-- 配件信息 -->
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title">
+              <text>配件信息</text>
+              <text class="colorts">
+                {{ info.flagName }}
+              </text>
+            </view>
+            <view class="accessories_list_card">
+              <view
+                class="accessories_list_a"
+                v-for="(item, index) in info.partsNewRefundManageRecordList || []"
+                :key="index"
+              >
+                <view class="accessories_list_a_info">
+                  <view>
+                    {{ item.partsName }}
+                  </view>
+                  <view> *{{ item.qty }} </view>
+                  <view> ¥{{ item.totalAmount }} </view>
+                </view>
+                <view class="accessories_list_a_number">
+                  <text>{{ item.partsNumber }}</text>
+                  <view
+                    v-if="~['REFUNDED'].indexOf(info.flag)"
+                    class="viewtkstate"
+                    @tap.stop="
+                      () => {
+                        listItem = item
+                        showPopup = true
+                      }
+                    "
+                  >
+                    查看退款状态
+                  </view>
+                </view>
+              </view>
+              <view class="accessories_list_amount">
+                合计:<text class="colorts">
+                  ¥{{
+                    [...(info.partsNewRefundManageRecordList || []).map(a => a.totalAmount || 0), 0].reduce((a, b) => {
+                      return a + b
+                    })
+                  }}
+                </text>
+              </view>
+            </view>
+            <view class="accessories_nfo_card_title"> 备注信息 </view>
+            <view class="accessories_nfo_card_note">
+              {{ info.remark }}
+            </view>
+          </view>
+          <!-- 申请信息 -->
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title"> 申请信息 </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请单号: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.applyNo }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请日期: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.createTime }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请人: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.workerName }}({{ info.workerId }}) </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 网点: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.websiteName }}({{ info.websiteNumber }}) </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请类别: </view>
+              <view class="accessories_nfo_info">
+                <radio-group
+                  v-if="info.flag === 'SAVE'"
+                  @change="
+                    d => {
+                      info.applyCategory = d.detail.value
+                    }
+                  "
+                >
+                  <label style="margin-right: 20upx">
+                    <radio value="HOME" :checked="info.applyCategory === 'HOME'" />家用空调
+                  </label>
+                  <label> <radio value="TRADE" :checked="info.applyCategory === 'TRADE'" />商用空调 </label>
+                  <br />
+                  <br />
+                  <label> <radio value="ELEC" :checked="info.applyCategory === 'ELEC'" />生活电器(小家电) </label>
+                </radio-group>
+                <view v-else>
+                  {{ info.applyCategoryName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请类型: </view>
+              <view class="accessories_nfo_info">
+                <radio-group
+                  v-if="info.flag === 'SAVE'"
+                  @change="
+                    d => {
+                      info.applyType = d.detail.value
+                    }
+                  "
+                >
+                  <label style="margin-right: 20upx">
+                    <radio value="NEW" :checked="info.applyType === 'NEW'" />新件返还
+                  </label>
+                  <label> <radio value="LOST" :checked="info.applyType === 'LOST'" />破损返还 </label>
+                  <br />
+                  <br />
+                  <label> <radio value="BUG" :checked="info.applyType === 'BUG'" />故障返还 </label>
+                </radio-group>
+                <view v-else>
+                  {{ info.applyTypeName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 返件方式: </view>
+              <view class="accessories_nfo_info">
+                <radio-group
+                  v-if="info.flag === 'SAVE'"
+                  @change="
+                    d => {
+                      info.refundMode = d.detail.value
+                    }
+                  "
+                >
+                  <label style="margin-right: 20upx">
+                    <radio value="EXPRESS" :checked="info.refundMode === 'EXPRESS'" />物流快递
+                  </label>
+                  <label> <radio value="SELF" :checked="info.refundMode === 'SELF'" />网点自还 </label>
+                </radio-group>
+                <view v-else>
+                  {{ info.refundModeName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 审批人: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.examineBy }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 审批时间: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.examineTime }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 审批结果: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.flagName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 审批备注: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.examineRemark }}
+                </view>
+              </view>
+            </view>
+          </view>
+          <!-- 发货信息 -->
+          <view class="accessories_nfo_card" v-if="~['SUBMIT', 'AGREE', 'REJECT', 'REFUNDED'].indexOf(info.flag)">
+            <view class="accessories_nfo_card_title"> 发货信息 </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 发货单位: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.workerName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 接收单位: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.receiveShopName }}({{ info.receiveShopId }}) </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 收货地址: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.receiveAddress }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 物流单号: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.expressNo }}
+                </view>
+              </view>
+            </view>
+          </view>
+          <popup
+            :value="showPopup"
+            @input="
+              val => {
+                showPopup = val
+              }
+            "
+          >
+            <view v-if="listItem" style="background: #fff; width: 500upx">
+              <view class="accessories_nfo_card">
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 退款金额: </view>
+                  <view class="accessories_nfo_info">
+                    <view>
+                      {{ listItem.refundAmount }}
+                    </view>
+                  </view>
+                </view>
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 退款状态: </view>
+                  <view class="accessories_nfo_info">
+                    <view>
+                      {{ ['成功', '失败', '等待'][['OK', 'FAIL', 'WAIT'].indexOf(listItem.refundState)] || '' }}
+                    </view>
+                  </view>
+                </view>
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 退款时间: </view>
+                  <view class="accessories_nfo_info">
+                    <view>
+                      {{ listItem.refundTime }}
+                    </view>
+                  </view>
+                </view>
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 退款方式: </view>
+                  <view class="accessories_nfo_info">
+                    <view> 微信 </view>
+                  </view>
+                </view>
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 微信接收账号: </view>
+                  <view class="accessories_nfo_info">
+                    <view>
+                      {{ listItem.refundMchNo }}
+                    </view>
+                  </view>
+                </view>
+              </view>
+            </view>
+          </popup>
+        </view>
+      </zj-page-fill>
+      <!-- <bt-container v-if="info && ~['AGREE'].indexOf(info.flag)">
+				<view class=" btcon pv30 ph10">
+					<view class="confirm-btn" v-if="~['AGREE'].indexOf(info.flag)">确认接收</view>
+				</view>
+			</bt-container> -->
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import popup from '@/components/popup.vue'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill,
+    popup
+  },
+  data() {
+    return {
+      showPopup: false,
+      info: null,
+      listItem: null
+    }
+  },
+  onLoad: function (option) {
+    this.getDetails(option.applyNo)
+  },
+  methods: {
+    getDetails(applyNo) {
+      this.$api
+        .get('/app/worker/new-refund/detail', {
+          applyNo
+        })
+        .then(res => {
+          this.info = res.data
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 238 - 0
src/packageAttachment/pages/returnOfNewParts/index.vue

@@ -0,0 +1,238 @@
+<template>
+  <view class="return_of_parts" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <view class="list_info_state">
+        <scroll-view scroll-x="true" class="scroll">
+          <view class="box" v-for="(item, index) in stateList" :key="index" @tap.stop="stateIndex = index">
+            <view
+              :class="{
+                selectox: stateIndex === index
+              }"
+              >{{ item.name }}</view
+            >
+            <view v-if="stateIndex === index" class="xhxh"></view>
+          </view>
+        </scroll-view>
+      </view>
+      <zj-page-fill
+        @scrolltolower="carScrolltolower"
+        @refresherrefresh="carRefresherrefresh"
+        @refresherrestore="carRefresherrestore"
+        :scrollAttribute="{
+          'refresher-enabled': true,
+          'refresher-triggered': refresherTriggered
+        }"
+      >
+        <view class="list_view_lay">
+          <block v-for="(item, index) in list" :key="index">
+            <order-of-sales-card v-if="stateType === 'SALES'" :item="item" type="entryStock" />
+            <card v-else :item="item" />
+          </block>
+        </view>
+      </zj-page-fill>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import card from './card.vue'
+import orderOfSalesCard from '../orderOfSales/card.vue'
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill,
+    card,
+    orderOfSalesCard
+  },
+  data() {
+    return {
+      stateList: [
+        {
+          name: '全部',
+          num: 0,
+          type: ''
+        },
+        {
+          name: '待处理',
+          num: 0,
+          type: 'SAVE'
+        },
+        {
+          name: '待审核',
+          num: 0,
+          type: 'SUBMIT'
+        },
+        {
+          name: '审核通过',
+          num: 0,
+          type: 'AGREE'
+        },
+        {
+          name: '审核驳回',
+          num: 0,
+          type: 'REJECT'
+        },
+        {
+          name: '已返还',
+          num: 0,
+          type: 'REFUNDED'
+        }
+      ],
+      stateIndex: 0,
+      // 下拉刷新状态
+      refresherTriggered: false,
+      redcbol: false,
+      pageNo: 1,
+      pageSize: 20,
+      list: [],
+      partsNumber: '',
+      isMore: true
+    }
+  },
+  onLoad: function (option) {
+    this.partsNumber = option.partsNumber || ''
+    if (option.state === 'SALES') {
+      this.stateList = [
+        {
+          name: '销售订单',
+          num: 0,
+          type: 'SALES'
+        },
+        ...this.stateList
+      ]
+    } else {
+      this.redc(true)
+    }
+  },
+  computed: {
+    stateType() {
+      return this.stateList[this.stateIndex].type
+    },
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  watch: {
+    stateType(newv, oldv) {
+      if (newv == 'SALES' || oldv == 'SALES') {
+        this.list = []
+      }
+      this.redc(true)
+    }
+  },
+  methods: {
+    // 获取新件返还管理列表
+    getList() {
+      this.$api
+        .get(this.stateType === 'SALES' ? '/app/worker/parts-sales/list' : '/app/worker/new-refund/list', {
+          pageNo: this.pageNo,
+          pageSize: this.pageSize,
+          identity: this.idcard,
+          partsNumber: this.partsNumber,
+          ...(this.stateType === 'SALES'
+            ? {
+                pushFlag: this.stateType
+              }
+            : {
+                flag: this.stateType
+              })
+        })
+        .then(res => {
+          if (res.data.records.length < this.pageSize) {
+            this.isMore = false
+          }
+          if (this.refresherTriggered || this.redcbol) {
+            this.list = res.data.records
+            this.refresherTriggered = false
+            this.redcbol = false
+          } else {
+            this.list = [...this.list, ...res.data.records]
+          }
+        })
+        .catch(() => {
+          if (this.refresherTriggered) {
+            this.list = []
+            this.refresherTriggered = false
+          }
+        })
+    },
+    // 滚动到底部
+    carScrolltolower(e) {
+      if (this.isMore) {
+        this.pageNo++
+        this.getList()
+      }
+    },
+    // 触发下拉刷新
+    carRefresherrefresh(e) {
+      this.refresherTriggered = true
+      this.redc()
+    },
+    // 切换更新数据
+    redc(v) {
+      this.redcbol = v
+      this.isMore = true
+      this.pageNo = 1
+      this.getList()
+    },
+    // 下拉刷新结束
+    carRefresherrestore(e) {}
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.return_of_parts {
+  .list_info_state {
+    width: 100%;
+    height: 88rpx;
+    box-sizing: border-box;
+    background: #ffffff;
+    position: relative;
+
+    .scroll {
+      width: 100%;
+      overflow: hidden;
+      white-space: nowrap;
+    }
+
+    .box {
+      display: inline-block;
+      width: auto;
+      height: 88upx;
+      margin-right: 30upx;
+      position: relative;
+      line-height: 88upx;
+
+      .xhxh {
+        position: absolute;
+        left: 10%;
+        bottom: 0;
+        width: 80%;
+        height: 6upx;
+        background: #6da7ff;
+      }
+    }
+
+    .selectox {
+      color: #6da7ff;
+    }
+
+    .box:first-child {
+      margin-left: 30upx;
+    }
+  }
+
+  .list_view_lay {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 30upx;
+  }
+}
+</style>

+ 80 - 0
src/packageAttachment/pages/returnOfOldParts/card.vue

@@ -0,0 +1,80 @@
+<template>
+  <view class="accessories_nfo_card" @tap.stop="toUrl">
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 维修工单号: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.workOrderNo }}
+        </view>
+      </view>
+      <view class="accessories_nfo_title colorts">
+        {{ item.flagName }}
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 配件名称: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.partsName }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 配件数量: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.qty }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 订单金额: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ info.totalAmount }}
+        </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 网点: </view>
+      <view class="accessories_nfo_info">
+        <view> {{ item.websiteName }}({{ item.websiteNumber }}) </view>
+      </view>
+    </view>
+    <view class="accessories_nfo_ac">
+      <view class="accessories_nfo_title"> 备注: </view>
+      <view class="accessories_nfo_info">
+        <view>
+          {{ item.remark }}
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    item: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  computed: {
+    info() {
+      return this.item.partsOldRefundManageRecordList[0] || {}
+    }
+  },
+  methods: {
+    toUrl() {
+      this.$navToPage({
+        url: `/packageAttachment/pages/returnOfOldParts/details?applyNo=${this.item.applyNo}`
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 319 - 0
src/packageAttachment/pages/returnOfOldParts/details.vue

@@ -0,0 +1,319 @@
+<template>
+  <view style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view class="accessories_nfo_card_view" v-if="info">
+          <!-- 配件信息 -->
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title">
+              <text>配件信息</text>
+              <text class="colorts">{{ info.flagName }}</text>
+            </view>
+            <view class="accessories_list_card">
+              <view
+                class="accessories_list_a"
+                v-for="(item, index) in info.partsOldRefundManageRecordList || []"
+                :key="index"
+              >
+                <view class="accessories_list_a_info">
+                  <view>
+                    {{ item.partsName }}
+                  </view>
+                  <view> *{{ item.qty }} </view>
+                  <view> ¥{{ item.totalAmount }} </view>
+                </view>
+                <view class="accessories_list_a_number">
+                  <text>{{ item.partsNumber }}</text>
+                  <view
+                    v-if="~['REFUNDED'].indexOf(info.flag)"
+                    class="viewtkstate"
+                    @tap.stop="
+                      () => {
+                        listItem = item
+                        showPopup = true
+                      }
+                    "
+                  >
+                    查看退款状态
+                  </view>
+                </view>
+              </view>
+              <view class="accessories_list_amount">
+                合计:<text class="colorts">
+                  ¥{{
+                    [...(info.partsOldRefundManageRecordList || []).map(a => a.totalAmount || 0), 0].reduce((a, b) => {
+                      return a + b
+                    })
+                  }}
+                </text>
+              </view>
+            </view>
+            <view class="accessories_nfo_card_title"> 备注信息 </view>
+            <view class="accessories_nfo_card_note">
+              {{ info.remark }}
+            </view>
+          </view>
+          <!-- 申请信息 -->
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title"> 申请信息 </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请单号: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.applyNo }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请日期: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.createTime }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 申请人: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.workerName }}({{ info.workerId }}) </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 网点: </view>
+              <view class="accessories_nfo_info">
+                <view> {{ info.websiteName }}({{ info.websiteNumber }}) </view>
+              </view>
+            </view>
+            <!-- <view class="accessories_nfo_ac">
+							<view class="accessories_nfo_title">
+								{{info.flag==='SAVE' && info.settlementState?"*":""}}申请类别:
+							</view>
+							<view class="accessories_nfo_info">
+								<radio-group v-if="info.flag==='SAVE' && info.settlementState"
+									@change="(d)=>{info.applyCategory=d.detail.value}">
+									<label style="margin-right: 20upx;">
+										<radio value="HOME" :checked="info.applyCategory==='HOME'" />家用空调
+									</label>
+									<label>
+										<radio value="TRADE" :checked="info.applyCategory==='TRADE'" />商用空调
+									</label>
+									<br />
+									<br />
+									<label>
+										<radio value="ELEC" :checked="info.applyCategory==='ELEC'" />生活电器(小家电)
+									</label>
+								</radio-group>
+								<view v-else>
+									{{['家用空调', '商用空调', '生活电器(小家电)'][['HOME', 'TRADE', 'ELEC'].indexOf(info.applyCategory)]}}
+								</view>
+							</view>
+						</view>
+						<view class="accessories_nfo_ac">
+							<view class="accessories_nfo_title">
+								{{info.flag==='SAVE' && info.settlementState?"*":""}}申请类型:
+							</view>
+							<view class="accessories_nfo_info">
+								<radio-group v-if="info.flag==='SAVE' && info.settlementState"
+									@change="(d)=>{info.applyType=d.detail.value}">
+									<label style="margin-right: 20upx;">
+										<radio value="NEW" :checked="info.applyType==='NEW'" />新件返还
+									</label>
+									<label>
+										<radio value="LOST" :checked="info.applyType==='LOST'" />破损返还
+									</label>
+									<br />
+									<br />
+									<label>
+										<radio value="BUG" :checked="info.applyType==='BUG'" />故障返还
+									</label>
+								</radio-group>
+								<view v-else>
+									{{['新件返还', '破损返还', '故障返还'][['NEW', 'LOST', 'BUG'].indexOf(info.applyType)]}}
+								</view>
+							</view>
+						</view>
+						<view class="accessories_nfo_ac">
+							<view class="accessories_nfo_title">
+								{{info.flag==='SAVE' && info.settlementState?"*":""}}返件方式:
+							</view>
+							<view class="accessories_nfo_info">
+								<radio-group v-if="info.flag==='SAVE' && info.settlementState"
+									@change="(d)=>{info.refundMode=d.detail.value}">
+									<label style="margin-right: 20upx;">
+										<radio value="EXPRESS" :checked="info.refundMode==='EXPRESS'" />物流快递
+									</label>
+									<label>
+										<radio value="SELF" :checked="info.refundMode==='SELF'" />网点自还
+									</label>
+								</radio-group>
+								<view v-else>
+									{{['物流快递', '网点自还'][['EXPRESS', 'SELF'].indexOf(info.refundMode)]}}
+								</view>
+							</view>
+						</view> -->
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 审批人: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.examineBy }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 审批时间: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.examineTime }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 审批备注: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.examineRemark }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 状态: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.flagName }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 返还日期: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ info.refundedTime }}
+                </view>
+              </view>
+            </view>
+          </view>
+          <popup
+            :value="showPopup"
+            @input="
+              val => {
+                showPopup = val
+              }
+            "
+          >
+            <view v-if="listItem" style="background: #fff; width: 500upx">
+              <view class="accessories_nfo_card">
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 退款金额: </view>
+                  <view class="accessories_nfo_info">
+                    <view>
+                      {{ listItem.refundAmount }}
+                    </view>
+                  </view>
+                </view>
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 退款状态: </view>
+                  <view class="accessories_nfo_info">
+                    <view>
+                      {{ ['成功', '失败', '等待'][['OK', 'FAIL', 'WAIT'].indexOf(listItem.refundState)] || '' }}
+                    </view>
+                  </view>
+                </view>
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 退款时间: </view>
+                  <view class="accessories_nfo_info">
+                    <view>
+                      {{ listItem.refundTime }}
+                    </view>
+                  </view>
+                </view>
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 退款方式: </view>
+                  <view class="accessories_nfo_info">
+                    <view> 微信 </view>
+                  </view>
+                </view>
+                <view class="accessories_nfo_ac">
+                  <view class="accessories_nfo_title"> 微信接收账号: </view>
+                  <view class="accessories_nfo_info">
+                    <view>
+                      {{ listItem.refundMchNo }}
+                    </view>
+                  </view>
+                </view>
+              </view>
+            </view>
+          </popup>
+        </view>
+      </zj-page-fill>
+      <!-- <bt-container v-if="info && info.flag === 'SAVE' && info.settlementState">
+				<view class="btcon pv30 ph10">
+					<view class="confirm-btn" @tap.stop="confirmation">确认返还</view>
+				</view>
+			</bt-container> -->
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import popup from '@/components/popup.vue'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill,
+    popup
+  },
+  // 额外添加的原生按钮
+  onNavigationBarButtonTap(e) {
+    if (e.text === '工单查看') {
+      this.$navToPage({
+        url: '/packageAttachment/pages/returnOfOldParts/workOrderView'
+      })
+    }
+  },
+  data() {
+    return {
+      showPopup: false,
+      info: null,
+      listItem: null
+    }
+  },
+  onLoad: function (option) {
+    this.getDetails(option.applyNo)
+  },
+  methods: {
+    getDetails(applyNo) {
+      this.$api
+        .get('/app/worker/old-refund/detail', {
+          applyNo
+        })
+        .then(res => {
+          this.info = res.data
+        })
+        .catch(() => {})
+    },
+    confirmation() {
+      var { applyCategory, applyNo, applyType, refundMode } = this.info
+      if (applyCategory && applyNo && applyType && refundMode) {
+        this.$api
+          .post('/app/worker/old-refund/submit', {
+            applyCategory,
+            applyNo,
+            applyType,
+            refundMode
+          })
+          .then(res => {
+            this.getDetails(applyNo)
+            uni.$emit('updataReturnOfOldPartsList')
+          })
+          .catch(() => {})
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 235 - 0
src/packageAttachment/pages/returnOfOldParts/index.vue

@@ -0,0 +1,235 @@
+<template>
+  <view class="return_of_parts" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <view class="list_info_state">
+        <scroll-view scroll-x="true" class="scroll">
+          <view class="box" v-for="(item, index) in stateList" :key="index" @tap.stop="stateIndex = index">
+            <view
+              :class="{
+                selectox: stateIndex === index
+              }"
+              >{{ item.name }}</view
+            >
+            <view v-if="stateIndex === index" class="xhxh"></view>
+          </view>
+        </scroll-view>
+      </view>
+      <zj-page-fill
+        @scrolltolower="carScrolltolower"
+        @refresherrefresh="carRefresherrefresh"
+        @refresherrestore="carRefresherrestore"
+        :scrollAttribute="{
+          'refresher-enabled': true,
+          'refresher-triggered': refresherTriggered
+        }"
+      >
+        <view class="list_view_lay">
+          <block v-for="(item, index) in list" :key="index">
+            <card :item="item" />
+          </block>
+        </view>
+      </zj-page-fill>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import card from './card.vue'
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill,
+    card
+  },
+  data() {
+    return {
+      stateList: [
+        {
+          name: '全部',
+          num: 0,
+          type: ''
+        },
+        {
+          name: '已保存',
+          num: 0,
+          type: 'SAVE'
+        },
+        {
+          name: '已提交',
+          num: 0,
+          type: 'SUBMIT'
+        },
+        {
+          name: '通过',
+          num: 0,
+          type: 'AGREE'
+        },
+        {
+          name: '驳回',
+          num: 0,
+          type: 'REJECT'
+        },
+        {
+          name: '已返还',
+          num: 0,
+          type: 'REFUNDED'
+        }
+      ],
+      stateIndex: 0,
+      // 下拉刷新状态
+      refresherTriggered: false,
+      redcbol: false,
+      pageNo: 1,
+      pageSize: 20,
+      list: [],
+      partsNumber: '',
+      isMore: true
+    }
+  },
+  onLoad: function (option) {
+    this.partsNumber = option.partsNumber || ''
+    this.redc(true)
+    uni.$on('updataReturnOfOldPartsList', () => {
+      if (this.list.length % this.pageSize > 0) {
+        this.redc(true, parseInt(this.list.length / this.pageSize) + this.pageSize)
+      } else {
+        this.redc(true, parseInt(this.list.length / this.pageSize))
+      }
+    })
+  },
+  onUnload() {
+    uni.$off('updataReturnOfOldPartsList')
+  },
+  computed: {
+    stateType() {
+      return this.stateList[this.stateIndex].type
+    },
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  watch: {
+    stateType(newv) {
+      this.redc(true)
+    }
+  },
+  methods: {
+    // 获取新件返还管理列表
+    getList(pageSize) {
+      this.$api
+        .get('/app/worker/old-refund/list', {
+          repairFlag: 'INNER',
+          pageNo: this.pageNo,
+          pageSize: pageSize || this.pageSize,
+          identity: this.idcard,
+          partsNumber: this.partsNumber,
+          flag: this.stateType
+        })
+        .then(res => {
+          if (pageSize) {
+            if (res.data.records.length % this.pageSize > 0) {
+              this.pageNo = parseInt(res.data.records.length / this.pageSize) + 1
+            } else {
+              this.pageNo = parseInt(res.data.records.length / this.pageSize)
+            }
+            if (res.data.records.length < pageSize) {
+              this.isMore = false
+            }
+          } else if (res.data.records.length < this.pageSize) {
+            this.isMore = false
+          }
+          if (this.refresherTriggered || this.redcbol) {
+            this.list = res.data.records
+            this.refresherTriggered = false
+            this.redcbol = false
+          } else {
+            this.list = [...this.list, ...res.data.records]
+          }
+        })
+        .catch(() => {
+          if (this.refresherTriggered) {
+            this.list = []
+            this.refresherTriggered = false
+          }
+        })
+    },
+    // 滚动到底部
+    carScrolltolower(e) {
+      if (this.isMore) {
+        this.pageNo++
+        this.getList()
+      }
+    },
+    // 触发下拉刷新
+    carRefresherrefresh(e) {
+      this.refresherTriggered = true
+      this.redc()
+    },
+    // 切换更新数据
+    redc(v, size) {
+      this.redcbol = v
+      this.isMore = true
+      this.pageNo = 1
+      this.getList(size)
+    },
+    // 下拉刷新结束
+    carRefresherrestore(e) {}
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.return_of_parts {
+  .list_info_state {
+    width: 100%;
+    height: 88rpx;
+    box-sizing: border-box;
+    background: #ffffff;
+    position: relative;
+
+    .scroll {
+      width: 100%;
+      overflow: hidden;
+      white-space: nowrap;
+    }
+
+    .box {
+      display: inline-block;
+      width: auto;
+      height: 88upx;
+      margin-right: 30upx;
+      position: relative;
+      line-height: 88upx;
+
+      .xhxh {
+        position: absolute;
+        left: 10%;
+        bottom: 0;
+        width: 80%;
+        height: 6upx;
+        background: #6da7ff;
+      }
+    }
+
+    .selectox {
+      color: #6da7ff;
+    }
+
+    .box:first-child {
+      margin-left: 30upx;
+    }
+  }
+
+  .list_view_lay {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 30upx;
+  }
+}
+</style>

+ 148 - 0
src/packageAttachment/pages/returnOfOldParts/workOrderView.vue

@@ -0,0 +1,148 @@
+<template>
+  <view style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <zj-page-fill>
+        <view class="accessories_nfo_card_view">
+          <view class="accessories_nfo_card">
+            <view class="accessories_nfo_card_title"> 配件信息 </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 旧件编码: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 旧件名称: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 退还数量: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 新建编码: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 新件名称: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 单位: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 单价: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 金额: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 维修记录编号: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 机器条码: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 修复时间: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 新压缩机编号: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 旧压缩机编号: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 配件条码: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+            <view class="accessories_nfo_ac">
+              <view class="accessories_nfo_title"> 安装日期: </view>
+              <view class="accessories_nfo_info">
+                <view>
+                  {{ '内容' }}
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+      </zj-page-fill>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+export default {
+  components: {
+    zjPageContainer,
+    zjPageFill
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import '@/static/style/accessories_nfo_card.scss';
+</style>

+ 60 - 0
src/packageAttachment/pages/sparePartsInventory/accessoriesItem.vue

@@ -0,0 +1,60 @@
+<template>
+  <view class="accessories_item" @tap.stop="toUrl">
+    <view class="accessories_item_lay">
+      <view class="accessories_item_title">
+        {{ item.partsName }}
+      </view>
+      <view class="accessories_item_number">
+        {{ item.partsNumber }}
+      </view>
+    </view>
+    <view class="accessories_item_lay">
+      <view class="accessories_item_inventory"> 库存{{ [item.oldQty, item.newQty][type] }} </view>
+      <view class="accessories_item_unit"> 单位:{{ item.unitName }} </view>
+    </view>
+    <view class="accessories_item_lay">
+      <view class="accessories_item_amount">
+        新件售价<text>¥{{ item.marketPrice }}</text>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    item: {
+      type: Object,
+      default: () => ({})
+    },
+    type: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data() {
+    return {}
+  },
+  methods: {
+    toUrl() {
+      if (this.type !== '') {
+        if (this.type === 0) {
+          this.$navToPage({
+            url: `/packageAttachment/pages/returnOfOldParts/index?partsNumber=${this.item.partsNumber || ''}`
+          })
+        } else if (this.type === 1) {
+          this.$navToPage({
+            url: `/packageAttachment/pages/returnOfNewParts/index?partsNumber=${
+              this.item.partsNumber || ''
+            }&state=SALES`
+          })
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import './style/accessories_item.scss';
+</style>

+ 106 - 0
src/packageAttachment/pages/sparePartsInventory/choosingAccessories.vue

@@ -0,0 +1,106 @@
+<template>
+  <view class="sparePartsInventory" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <view class="pv30" style="background: #fff">
+        <search-input @search="search" />
+      </view>
+      <view class="pv30 picker-view-bock" v-if="!option.partsWebsiteNumber && !option.shopId">
+        <view class="picker-view">
+          <picker
+            class="picker-select"
+            @change="bindPickerChange"
+            :value="index"
+            :range="shopList"
+            range-key="shopName"
+          >
+            <view class="picker-select-input">{{ shopList[index] ? shopList[index].shopName : '请选择' }}</view>
+          </picker>
+          <image class="icon_next" src="/static/images/fittingsManagement/icon_next.png" mode="aspectFill"></image>
+        </view>
+      </view>
+      <zj-page-fill :scroll="false">
+        <zj-page-container direction="row">
+          <view style="width: 180rpx; height: 100%">
+            <zj-page-container>
+              <zj-page-fill>
+                <view
+                  v-for="(item, index) in accessoriesList"
+                  :key="index"
+                  :class="{ accessories_type_a: true, accessories_selected: accessoriesIndex === index }"
+                  @tap.stop="accessoriesIndex = index"
+                >
+                  <view class="accessories_type_text">
+                    {{ item.value }}
+                  </view>
+                </view>
+              </zj-page-fill>
+            </zj-page-container>
+          </view>
+          <zj-page-fill
+            zjPageFillClass="zjPageFillClass"
+            @scrolltolower="carScrolltolower"
+            @refresherrefresh="carRefresherrefresh"
+            @refresherrestore="carRefresherrestore"
+            :scrollAttribute="{
+              'refresher-enabled': false,
+              'refresher-triggered': refresherTriggered
+            }"
+          >
+            <view class="scroll_list_view">
+              <block v-for="(item, index) in list" :key="index">
+                <accessoriesItem
+                  :item="item"
+                  :id="selItem.id || ''"
+                  @selectItem="
+                    itm => {
+                      selItem = itm
+                    }
+                  "
+                />
+              </block>
+            </view>
+          </zj-page-fill>
+        </zj-page-container>
+      </zj-page-fill>
+      <bt-container>
+        <view class="btcon pv30 ph10">
+          <view class="confirm-btn" @tap.stop="save">保存</view>
+        </view>
+      </bt-container>
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import searchInput from '@/components/searchInput.vue'
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import accessoriesItem from './choosingAccessoriesItem.vue'
+import getData from './mixins/getData.js'
+export default {
+  components: {
+    searchInput,
+    zjPageContainer,
+    zjPageFill,
+    accessoriesItem
+  },
+  mixins: [getData],
+  data() {
+    return {
+      selItem: {}
+    }
+  },
+  methods: {
+    save() {
+      uni.$emit('getAccessoriesItem', this.selItem)
+      uni.navigateBack({
+        delta: 1
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import './style/style.scss';
+</style>

+ 80 - 0
src/packageAttachment/pages/sparePartsInventory/choosingAccessoriesItem.vue

@@ -0,0 +1,80 @@
+<template>
+  <view class="choosing_accessories_item">
+    <view class="accessories_item minwidth" @tap.stop="$emit('selectItem', item)">
+      <view class="accessories_item_lay">
+        <view class="accessories_item_title">
+          {{ item.partsName }}
+        </view>
+        <view class="accessories_item_number">
+          {{ item.partsNumber }}
+        </view>
+      </view>
+      <view class="accessories_item_lay">
+        <view class="accessories_item_inventory"> 库存{{ item.newQty }} </view>
+        <view class="accessories_item_unit"> 单位:{{ item.unitName }} </view>
+      </view>
+      <view class="accessories_item_lay">
+        <view class="accessories_item_amount">
+          新件售价<text>¥{{ item.salesPrice }}</text>
+        </view>
+      </view>
+    </view>
+    <view class="checked">
+      <radio-group @change="radioChange">
+        <radio :value="item.id" :checked="item.id === id"></radio>
+      </radio-group>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    item: {
+      type: Object,
+      default: () => ({})
+    },
+    id: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  methods: {
+    radioChange(b) {
+      if (b.detail.value === this.id) {
+        this.$emit('selectItem', {})
+      } else {
+        this.$emit('selectItem', this.item)
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import './style/accessories_item.scss';
+
+.choosing_accessories_item {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+
+  &:not(:last-child) {
+    border-bottom: 1rpx solid #e5e5e5;
+  }
+
+  .minwidth {
+    width: 86% !important;
+  }
+
+  .checked {
+    margin-left: 20upx;
+  }
+
+  .accessories_item {
+    border-bottom: none !important;
+  }
+}
+</style>

+ 97 - 0
src/packageAttachment/pages/sparePartsInventory/index.vue

@@ -0,0 +1,97 @@
+<template>
+  <view class="sparePartsInventory" style="width: 100%; height: 100vh">
+    <zj-page-container>
+      <view class="pv30" style="background: #fff">
+        <search-input @search="search" />
+      </view>
+      <view class="pv30 picker-view-bock">
+        <view class="picker-view">
+          <picker
+            class="picker-select"
+            @change="bindPickerChange"
+            :value="index"
+            :range="shopList"
+            range-key="shopName"
+          >
+            <view class="picker-select-input">{{ shopList[index] ? shopList[index].shopName : '请选择' }}</view>
+          </picker>
+          <image class="icon_next" src="/static/images/fittingsManagement/icon_next.png" mode="aspectFill"></image>
+        </view>
+      </view>
+      <view class="type_switching" v-if="showTypeSwitching">
+        <view :class="{ new_left_type: true, selected: selected === 1 }" @tap.stop="selected = 1">
+          <text>新件库存</text>
+        </view>
+        <view :class="{ old_right_type: true, selected: selected === 0 }" @tap.stop="selected = 0">
+          <text>旧件库存</text>
+        </view>
+      </view>
+      <zj-page-fill :scroll="false">
+        <zj-page-container direction="row">
+          <view style="width: 180rpx; height: 100%">
+            <zj-page-container>
+              <zj-page-fill>
+                <view
+                  v-for="(item, index) in accessoriesList"
+                  :key="index"
+                  :class="{ accessories_type_a: true, accessories_selected: accessoriesIndex === index }"
+                  @tap.stop="accessoriesIndex = index"
+                >
+                  <view class="accessories_type_text">
+                    {{ item.value }}
+                  </view>
+                </view>
+              </zj-page-fill>
+            </zj-page-container>
+          </view>
+          <zj-page-fill
+            zjPageFillClass="zjPageFillClass"
+            @scrolltolower="carScrolltolower"
+            @refresherrefresh="carRefresherrefresh"
+            @refresherrestore="carRefresherrestore"
+            :scrollAttribute="{
+              'refresher-enabled': false,
+              'refresher-triggered': refresherTriggered
+            }"
+          >
+            <view class="scroll_list_view">
+              <block v-for="(item, index) in list" :key="index">
+                <accessoriesItem :item="item" :type="selected" />
+              </block>
+            </view>
+          </zj-page-fill>
+        </zj-page-container>
+      </zj-page-fill>
+      <!-- <bt-container>
+				<view class="btcon pv30 ph10">
+					<view class="confirm-btn" @tap="buyAccessories">购买配件</view>
+				</view>
+			</bt-container> -->
+    </zj-page-container>
+  </view>
+</template>
+
+<script>
+import searchInput from '@/components/searchInput.vue'
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
+import accessoriesItem from './accessoriesItem.vue'
+import getData from './mixins/getData.js'
+export default {
+  components: {
+    searchInput,
+    zjPageContainer,
+    zjPageFill,
+    accessoriesItem
+  },
+  mixins: [getData],
+  data() {
+    return {}
+  },
+  methods: {}
+}
+</script>
+
+<style scoped lang="scss">
+@import './style/style.scss';
+</style>

+ 159 - 0
src/packageAttachment/pages/sparePartsInventory/mixins/getData.js

@@ -0,0 +1,159 @@
+import { getStorage } from '@/common/utils/storage.js'
+export default {
+  data() {
+    return {
+      // 网点下拉选项
+      shopList: [],
+      // 网点下拉选项选中的下标
+      index: 0,
+      // 类型切换选中值
+      selected: 1,
+      // 是否显示类型切换
+      showTypeSwitching: true,
+      // 下拉刷新状态
+      refresherTriggered: false,
+      // 配件类型列表
+      accessoriesList: [],
+      // 类型选中下标
+      accessoriesIndex: -1,
+      // 列表数据
+      list: [],
+      // 名称搜索
+      partsName: '',
+      option: {},
+      apis: {
+        default: {
+          getGroupUrl: '/app/parts/stock/exist/shop/group/list',
+          getStockUrl: '/app/parts/stock/exist/shop/stock/list'
+        },
+        applicationParts: {
+          getGroupUrl: '/app/parts/shop/stock/group/list',
+          getStockUrl: '/app/parts/shop/stock/list'
+        }
+      }
+    }
+  },
+  onLoad(option) {
+    this.option = option
+    if (!option.partsWebsiteNumber && !option.shopId) {
+      this.getShopInfo()
+    }
+  },
+  computed: {
+    accessoriesParams() {
+      if (this.option.partsWebsiteNumber && this.option.shopId) {
+        return {
+          identity: this.userInfo.idCard,
+          partsWebsiteNumber: this.option.partsWebsiteNumber,
+          shopId: this.option.shopId
+        }
+      }
+      var data = this.shopList[this.index]
+      if (data) {
+        return {
+          identity: this.userInfo.idCard,
+          partsAttr: ['OLD', 'NEW'][this.selected],
+          partsWebsiteNumber: data.partsWebsiteNumber,
+          shopId: data.shopId
+        }
+      } else {
+        return false
+      }
+    },
+    userInfo() {
+      return getStorage('user')
+    },
+    idcard() {
+      return this.userInfo.idCard
+    }
+  },
+  watch: {
+    accessoriesParams(newVal) {
+      this.getGroup(newVal)
+      this.list = []
+    },
+    accessoriesList(newVal) {
+      if (this.accessoriesIndex !== 0) {
+        this.accessoriesIndex = 0
+      } else {
+        this.getStock()
+      }
+    },
+    accessoriesIndex() {
+      this.getStock()
+    },
+    partsName() {
+      this.getStock()
+    }
+  },
+  methods: {
+    // 获取网点
+    getShopInfo() {
+      this.$api
+        .get('/app/parts/stock/exist/shop/list', {
+          identity: this.idcard
+        })
+        .then(res => {
+          this.shopList = res.data
+        })
+        .catch(() => {
+          this.shopList = []
+        })
+    },
+    // 获取分组
+    getGroup(params) {
+      if (params) {
+        this.$api
+          .get(this.apis[this.option.apiType || 'default'].getGroupUrl, params)
+          .then(res => {
+            this.accessoriesList = res.data
+          })
+          .catch(() => {
+            this.accessoriesList = []
+          })
+      } else {
+        this.accessoriesList = []
+      }
+    },
+    // 获取配件
+    getStock() {
+      if (this.accessoriesList.length && this.accessoriesList[this.accessoriesIndex]) {
+        this.$api
+          .get(this.apis[this.option.apiType || 'default'].getStockUrl, {
+            ...this.accessoriesParams,
+            materialGroupId: this.accessoriesList[this.accessoriesIndex].id,
+            partsName: this.partsName
+          })
+          .then(res => {
+            this.list = res.data
+          })
+          .catch(() => {
+            this.list = []
+          })
+      } else {
+        this.list = []
+      }
+    },
+    // 搜索按钮
+    search(val) {
+      this.partsName = val
+    },
+    // 监听下拉选项
+    bindPickerChange(e) {
+      this.index = e.detail.value
+    },
+    // 滚动到底部
+    carScrolltolower(e) {},
+    // 触发下拉刷新
+    carRefresherrefresh(e) {
+      this.refresherTriggered = true
+      setTimeout(() => {
+        this.refresherTriggered = false
+      }, 3000)
+    },
+    // 下拉刷新结束
+    carRefresherrestore(e) {},
+    // 点击购买配件
+    buyAccessories() {}
+  }
+}

+ 79 - 0
src/packageAttachment/pages/sparePartsInventory/style/accessories_item.scss

@@ -0,0 +1,79 @@
+.accessories_item {
+	width: 100%;
+	height: 160rpx;
+	box-sizing: border-box;
+	padding: 20rpx 0;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+
+	&:not(:last-child) {
+		border-bottom: 1rpx solid #e5e5e5;
+	}
+
+	.accessories_item_lay {
+		width: 100%;
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+		align-items: center;
+	}
+
+	.accessories_item_title {
+		width: 50%;
+		font-size: 14px;
+		font-family: PingFang SC, PingFang SC-Medium;
+		font-weight: 500;
+		text-align: left;
+		color: #333333;
+		line-height: 16px;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
+
+	.accessories_item_number {
+		font-size: 14px;
+		font-family: PingFang SC, PingFang SC-Medium;
+		font-weight: 500;
+		text-align: right;
+		color: #333333;
+		line-height: 16px;
+	}
+
+	.accessories_item_inventory {
+		font-size: 12px;
+		font-family: PingFang SC, PingFang SC-Medium;
+		font-weight: 500;
+		text-align: left;
+		color: #666666;
+		line-height: 16px;
+	}
+
+	.accessories_item_return {
+		font-size: 12px;
+		font-family: PingFang SC, PingFang SC-Medium;
+		font-weight: 500;
+		text-align: left;
+		color: #e95505;
+		line-height: 16px;
+	}
+
+	.accessories_item_unit {
+		font-size: 12px;
+		font-family: PingFang SC, PingFang SC-Medium;
+		font-weight: 500;
+		text-align: right;
+		color: #666666;
+		line-height: 16px;
+	}
+
+	.accessories_item_amount {
+		font-size: 12px;
+		font-family: PingFang SC, PingFang SC-Medium;
+		font-weight: bold;
+		text-align: left;
+		color: #e95505;
+		line-height: 16px;
+	}
+}

+ 121 - 0
src/packageAttachment/pages/sparePartsInventory/style/style.scss

@@ -0,0 +1,121 @@
+.sparePartsInventory {
+	::v-deep .zjPageFillClass {
+		background: #ffffff;
+	}
+
+	.picker-view-bock {
+		width: 100%;
+		background: #ffffff;
+		padding-bottom: 10rpx;
+
+		.picker-view {
+			width: 100%;
+			height: 58rpx;
+			border: 1rpx solid #e5e5e5;
+			border-radius: 8rpx;
+			display: flex;
+			flex-direction: row;
+			flex-wrap: nowrap;
+			justify-content: space-between;
+			align-items: center;
+			box-sizing: border-box;
+			padding: 0rpx 12rpx;
+
+			.picker-select {
+				width: 100%;
+				height: 100%;
+
+				.picker-select-input {
+					width: 100%;
+					height: 100%;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					line-height: 56rpx;
+					font-size: 12px;
+					font-family: PingFang SC, PingFang SC-Medium;
+					font-weight: 500;
+					color: #333333;
+				}
+			}
+
+			.icon_next {
+				width: 24rpx;
+				height: 24rpx;
+				min-width: 24rpx;
+				min-height: 24rpx;
+				margin-left: 12rpx;
+			}
+		}
+	}
+
+	.type_switching {
+		width: 100%;
+		height: 100rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+
+		.new_left_type,
+		.old_right_type {
+			width: 200rpx;
+			height: 60rpx;
+			border: 2rpx solid #6DA7FF;
+			color: #6DA7FF;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+
+		.new_left_type {
+			border-top-left-radius: 30rpx;
+			border-bottom-left-radius: 30rpx;
+			border-right: 0 !important;
+		}
+
+		.old_right_type {
+			border-top-right-radius: 30rpx;
+			border-bottom-right-radius: 30rpx;
+			border-left: 0 !important;
+		}
+
+		.selected {
+			background: #6DA7FF;
+			color: #ffffff;
+		}
+	}
+
+	.accessories_type_a {
+		width: 100%;
+		height: 100rpx;
+		box-sizing: border-box;
+		padding: 20rpx;
+		display: flex;
+		align-items: center;
+		font-size: 28rpx;
+		font-family: PingFang SC, PingFang SC-Medium;
+		font-weight: 500;
+		text-align: left;
+		color: #333333;
+		line-height: 32rpx;
+
+		.accessories_type_text {
+			overflow: hidden;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-line-clamp: 2;
+			-webkit-box-orient: vertical;
+		}
+	}
+
+	.accessories_selected {
+		color: #ffffff;
+		background: #6DA7FF;
+	}
+
+	.scroll_list_view {
+		width: 100%;
+		box-sizing: border-box;
+		padding: 0 30rpx;
+	}
+}

+ 355 - 264
src/packageGoods/pages/order.vue

@@ -3,8 +3,16 @@
     <zj-page-layout :hasFooter="true">
       <template slot="header">
         <view class="noticebar-container" v-if="isNoticebar">
-          <uni-notice-bar v-if="noticeContent" scrollable="true" single="true" showClose="true" :text="noticeContent"
-            background-color="#f6e6e7" color="#de3749" @close="isNoticebar = false"></uni-notice-bar>
+          <uni-notice-bar
+            v-if="noticeContent"
+            scrollable="true"
+            single="true"
+            showClose="true"
+            :text="noticeContent"
+            background-color="#f6e6e7"
+            color="#de3749"
+            @close="isNoticebar = false"
+          ></uni-notice-bar>
         </view>
       </template>
       <view class="all-container">
@@ -13,10 +21,12 @@
             <view class="icon"><text class="iconfont icon-dingwei1"></text></view>
             <view class="nodata" v-if="!hasAddress">选择收货地址</view>
             <view class="hasdata" v-else>
-              <view class="name">{{ addressInfo.name }}<text>{{ addressInfo.phone }}</text></view>
+              <view class="name"
+                >{{ addressInfo.name }}<text>{{ addressInfo.phone }}</text></view
+              >
               <view class="address ellipsis-2">
-                {{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.area }}{{ addressInfo.street }}{{
-                  addressInfo.address }}{{ addressInfo.houseNo }}
+                {{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.area }}{{ addressInfo.street
+                }}{{ addressInfo.address }}{{ addressInfo.houseNo }}
               </view>
             </view>
           </view>
@@ -25,7 +35,7 @@
 
         <view class="card goods-container">
           <view class="title">商品信息</view>
-          <block v-for="(item, index) in goodsList" :key='index'>
+          <block v-for="(item, index) in goodsList" :key="index">
             <view class="item">
               <image :src="item.imgUrl" mode="aspectFill"></image>
               <view class="right">
@@ -37,8 +47,15 @@
                     <view class="price-2">¥{{ item.orgPrice | priceFilter }}</view>
                   </view>
 
-                  <u-number-box @tap.stop v-model="item.num" :min="1" :buttonSize="26" iconStyle="font-size: 12px;"
-                    :disabled="!hasAddress || tradeIds" @change="changeCount($event, index)">
+                  <u-number-box
+                    @tap.stop
+                    v-model="item.num"
+                    :min="1"
+                    :buttonSize="26"
+                    iconStyle="font-size: 12px;"
+                    :disabled="!hasAddress || tradeIds"
+                    @change="changeCount($event, index)"
+                  >
                   </u-number-box>
                 </view>
               </view>
@@ -52,13 +69,17 @@
           <view class="main">
             <image :src="tradeInfo.imgUrl"></image>
             <view class="right">
-              <view class="name">{{tradeInfo.name}}</view>
-              <view class="attr">{{tradeInfo.goodsCategoryItemList.map(o => o.dictName).join('、')}}</view>
+              <view class="name">{{ tradeInfo.name }}</view>
+              <view class="attr">{{ tradeInfo.goodsCategoryItemList.map(o => o.dictName).join('、') }}</view>
             </view>
           </view>
           <view class="bottom">
-            <view class="left">旧机费用:<text>¥{{tradeInfo.payAmount | priceFilter}}</text></view>
-            <view class="right">{{{1: '线上支付抵扣订单货款', 2: '仅线上展示旧机价值'}[tradeInfo.yjhxDkFlag]}}</view>
+            <view class="left"
+              >旧机费用:<text>¥{{ tradeInfo.payAmount | priceFilter }}</text></view
+            >
+            <view class="right">{{
+              { 1: '线上支付抵扣订单货款', 2: '仅线上展示旧机价值' }[tradeInfo.yjhxDkFlag]
+            }}</view>
           </view>
         </view>
 
@@ -67,7 +88,7 @@
             <view class="title">优惠券</view>
             <view class="coupon" @tap="chooseCoupon">
               <text v-if="hasCoupon">{{ couponInfo.couponName }}</text>
-              <text v-else style="color: #666666;">未使用优惠券</text>
+              <text v-else style="color: #666666">未使用优惠券</text>
               <text class="iconfont icon-jinru"></text>
             </view>
           </view>
@@ -78,7 +99,9 @@
           </view>
           <view class="item">
             <view class="title">买家留言</view>
-            <view class="remark"><textarea auto-height placeholder="选填,留言建议50字内" v-model="remark"></textarea></view>
+            <view class="remark">
+              <textarea auto-height placeholder="选填,留言建议50字内" v-model="remark"></textarea>
+            </view>
           </view>
         </view>
 
@@ -109,19 +132,29 @@
           </view>
           <view class="item">
             <view class="title">优惠</view>
-            <view class="price">-¥{{ (couponInfo.couponValue ? couponInfo.couponValue : (orderInfo.exchangeAmount || 0)) |
-              priceFilter }}</view>
+            <view class="price"
+              >-¥{{
+                (couponInfo.couponValue ? couponInfo.couponValue : orderInfo.exchangeAmount || 0) | priceFilter
+              }}</view
+            >
           </view>
           <view class="item" v-if="orderInfo.promotionFullPieceDiscountAmount">
-          	<view class="title">满件打折<text>{{orderInfo.promotionFullPriceRemark}}</text></view>
-          	<view class="price">-¥{{orderInfo.promotionFullPieceDiscountAmount | numToFixed}}</view>
+            <view class="title"
+              >满件打折<text>{{ orderInfo.promotionFullPriceRemark }}</text></view
+            >
+            <view class="price">-¥{{ orderInfo.promotionFullPieceDiscountAmount | numToFixed }}</view>
           </view>
         </view>
 
         <view class="card row-container">
           <view class="item">
             <view class="title">订单总金额</view>
-            <view class="price">¥{{ Math.max(0, orderInfo.payAmount - (tradeInfo && tradeInfo.yjhxDkFlag == 1 ? tradeInfo.payAmount : 0)) | priceFilter }}</view>
+            <view class="price"
+              >¥{{
+                Math.max(0, orderInfo.payAmount - (tradeInfo && tradeInfo.yjhxDkFlag == 1 ? tradeInfo.payAmount : 0))
+                  | priceFilter
+              }}</view
+            >
           </view>
         </view>
       </view>
@@ -131,12 +164,23 @@
           <view class="left">
             <view class="row-1">
               <view class="it-1">共{{ orderInfo.totalNum }}件,合计:</view>
-              <view class="it-2"><text>¥</text>{{ Math.max(0, orderInfo.payAmount - (tradeInfo && tradeInfo.yjhxDkFlag == 1 ? tradeInfo.payAmount : 0)) | priceFilter }}</view>
+              <view class="it-2"
+                ><text>¥</text
+                >{{
+                  Math.max(0, orderInfo.payAmount - (tradeInfo && tradeInfo.yjhxDkFlag == 1 ? tradeInfo.payAmount : 0))
+                    | priceFilter
+                }}</view
+              >
             </view>
           </view>
           <view class="btn-group">
-            <u-button type="primary" plain text="代客下单" @click="replaceOrder"
-              v-if="(isServiceUser || isHeadUser) && !isGiftGoods && !groupbuyId"></u-button>
+            <u-button
+              type="primary"
+              plain
+              text="代客下单"
+              @click="replaceOrder"
+              v-if="(isServiceUser || isHeadUser) && !isGiftGoods && !groupbuyId"
+            ></u-button>
             <u-button type="primary" text="提交订单" @click="submitOrder"></u-button>
           </view>
         </view>
@@ -157,7 +201,7 @@
 </template>
 
 <script>
-import { weixinPay, mini_env } from '@/common/utils/util.js';
+import { weixinPay, mini_env } from '@/common/utils/util.js'
 export default {
   data() {
     return {
@@ -180,25 +224,28 @@ export default {
       secToken: null,
       orderId: null, // 订单id
       isGiftGoods: false, // 是否福利商品
-			isFullPieceGoods: false, // 是否满件打折商品
+      isFullPieceGoods: false, // 是否满件打折商品
       isNoticebar: false, // 是否显示公告栏
       noticeContent: '', // 公告内容
       groupbuyId: null, // 团购id
       payType: 1,
       tradeIds: null,
-      tradeInfo: null,
+      tradeInfo: null
     }
   },
   computed: {
-    isServiceUser() { // 是否业务员
-      return this.userInfo.type === 'SERVICE';
-    },
-    isHeadUser() { // 是否团长
-      return this.userInfo.promotionGroupLeader;
+    isServiceUser() {
+      // 是否业务员
+      return this.userInfo.type === 'SERVICE'
     },
-    isInnerrUser() { // 是否内部人员
-      return this.userInfo.innerr;
+    isHeadUser() {
+      // 是否团长
+      return this.userInfo.promotionGroupLeader
     },
+    isInnerrUser() {
+      // 是否内部人员
+      return this.userInfo.innerr
+    }
 
     // total() {
     // 	let price = Number(this.orderInfo.totalAmount); // 商品金额
@@ -209,166 +256,176 @@ export default {
     // },
   },
   async onLoad({ secKillId, secKillSpecId, secToken, groupbuyId, tradeIds }) {
-    this.getNoticebar();
+    this.getNoticebar()
 
-    this.userInfo = await this.$getUserInfo();
-    this.configInfo = await this.$getConfigInfo();
+    this.userInfo = await this.$getUserInfo()
+    this.configInfo = await this.$getConfigInfo()
 
-    this.buyList = this.$getStorage('goodsBuyList');
-    this.$removeStorage('goodsBuyList');
+    this.buyList = this.$getStorage('goodsBuyList')
+    this.$removeStorage('goodsBuyList')
 
-    console.log(this.buyList);
-    this.secKillId = secKillId;
-    this.secKillSpecId = secKillSpecId;
-    this.secToken = secToken;
-    this.groupbuyId = groupbuyId;
-    this.tradeIds = tradeIds;
+    console.log(this.buyList)
+    this.secKillId = secKillId
+    this.secKillSpecId = secKillSpecId
+    this.secToken = secToken
+    this.groupbuyId = groupbuyId
+    this.tradeIds = tradeIds
 
-    if(tradeIds) {
-      this.getTradeInfo();
+    if (tradeIds) {
+      this.getTradeInfo()
     }
 
     // 进入页面先获取默认地址
-    await this.getAddress();
+    await this.getAddress()
 
     // 获取订单信息
-    this.getOrderInfo();
+    this.getOrderInfo()
 
     // 接收地址信息
     this.crossPage.$on('chooseAddress', result => {
-      this.hasAddress = true;
-      this.addressInfo = result;
-      this.getOrderInfo();
+      this.hasAddress = true
+      this.addressInfo = result
+      this.getOrderInfo()
     })
 
     // 接收优惠券信息
     this.crossPage.$on('chooseCoupon', result => {
       if (result) {
-        this.hasCoupon = true;
-        this.couponInfo = result;
+        this.hasCoupon = true
+        this.couponInfo = result
       } else {
-        this.hasCoupon = false;
-        this.couponInfo = {};
+        this.hasCoupon = false
+        this.couponInfo = {}
       }
-      this.getOrderInfo();
+      this.getOrderInfo()
     })
   },
 
   onUnload() {
-    this.crossPage.$off('chooseAddress');
-    this.crossPage.$off('chooseCoupon');
+    this.crossPage.$off('chooseAddress')
+    this.crossPage.$off('chooseCoupon')
   },
 
   methods: {
     findElem(array, attr, val) {
       for (var i = 0; i < array.length; i++) {
         if (array[i][attr] == val) {
-          return i; //返回当前索引值
+          return i //返回当前索引值
         }
       }
-      return -1;
+      return -1
     },
 
     // 获取公告栏
     getNoticebar() {
-      this.$api.get('/shpping/cart/notice', {
-        userId: this.$store.state.user.userId
-      }).then(res => {
-        this.noticeContent = res.data;
-        this.isNoticebar = res.data ? true : false;
-      })
+      this.$api
+        .get('/shpping/cart/notice', {
+          userId: this.$store.state.user.userId
+        })
+        .then(res => {
+          this.noticeContent = res.data
+          this.isNoticebar = res.data ? true : false
+        })
     },
 
     // 关闭通告栏
     closeNoticebar() {
-      this.isNoticebar = false;
+      this.isNoticebar = false
     },
 
     // 获取订单信息
     getOrderInfo(type) {
-      let tradeIds = this.tradeIds ? this.tradeIds.split(',') : [];
-      this.$api.postJson('/order/ackdata', {
-        buyGoods: this.buyList,
-        userAddressId: this.addressInfo.userAddressId,
-        userCouponId: this.hasCoupon ? this.couponInfo.id : '',
-        promotionGroupId: this.groupbuyId || '',
-        orderOldProductAdds: tradeIds.length > 0 ? {
-          id: tradeIds[0],
-          itemIds: tradeIds.slice(1)
-        } : null,
-        isOld: tradeIds.length > 0 ? 'YES' : 'NO'
-      }).then(res => {
-        if (res.code == 1100) {
-          return this.$tips(res.message);
-        } else if (res.code !== 200) {
+      let tradeIds = this.tradeIds ? this.tradeIds.split(',') : []
+      this.$api
+        .postJson('/order/ackdata', {
+          buyGoods: this.buyList,
+          userAddressId: this.addressInfo.userAddressId,
+          userCouponId: this.hasCoupon ? this.couponInfo.id : '',
+          promotionGroupId: this.groupbuyId || '',
+          orderOldProductAdds:
+            tradeIds.length > 0
+              ? {
+                  id: tradeIds[0],
+                  itemIds: tradeIds.slice(1)
+                }
+              : null,
+          isOld: tradeIds.length > 0 ? 'YES' : 'NO'
+        })
+        .then(res => {
+          if (res.code == 1100) {
+            return this.$tips(res.message)
+          } else if (res.code !== 200) {
+            setTimeout(() => {
+              uni.navigateBack({
+                delta: 1
+              })
+            }, 1000)
+          }
+
+          if (res.data.promotionFullPriceRemark) {
+            let str = res.data.promotionFullPriceRemark
+            let str1 = str.substring(0, str.indexOf('打') + 1)
+            let str2 = str.substring(str.indexOf('折') + 1, str.indexOf('折'))
+            let num = str.substring(str.indexOf('打') + 1, str.indexOf('折'))
+            res.data.promotionFullPriceRemark = str1 + Number(num) + str2
+          }
+
+          this.orderInfo = res.data
+          this.goodsList = res.data.goods
+          this.isSeckill = res.data.isSecKill
+          this.freight = res.data.freight
+          this.isGiftGoods = this.findElem(res.data.goods, 'isGift', true) >= 0
+          this.isFullPieceGoods = this.findElem(res.data.goods, 'promotionFullPiece', true) >= 0
+        })
+        .catch(res => {
           setTimeout(() => {
             uni.navigateBack({
               delta: 1
             })
           }, 1000)
-        }
-
-        if(res.data.promotionFullPriceRemark) {
-        	let str = res.data.promotionFullPriceRemark;
-        	let str1 = str.substring(0, str.indexOf('打')+1);
-        	let str2 = str.substring(str.indexOf('折')+1, str.indexOf('折'));
-        	let num = str.substring(str.indexOf('打')+1, str.indexOf('折'));
-        	res.data.promotionFullPriceRemark = str1 + Number(num) + str2;
-        }
-
-        this.orderInfo = res.data;
-        this.goodsList = res.data.goods;
-        this.isSeckill = res.data.isSecKill;
-        this.freight = res.data.freight;
-        this.isGiftGoods = this.findElem(res.data.goods, 'isGift', true) >= 0;
-				this.isFullPieceGoods = this.findElem(res.data.goods, 'promotionFullPiece', true) >= 0;
-      }).catch(res => {
-        setTimeout(() => {
-          uni.navigateBack({
-            delta: 1
-          })
-        }, 1000)
-      })
+        })
     },
 
     // 获取地址信息
     async getAddress() {
       return new Promise((resolve, reject) => {
-        this.$api.get('/user/address/list', {
-          pageNum: 1,
-          pageSize: 100,
-          userId: this.$store.state.user.userId
-        }).then(res => {
-          let hasDefault = this.findElem(res.data.records, 'defaultAddr', true);
-          if (hasDefault >= 0) {
-            this.hasAddress = true;
-            this.addressInfo = res.data.records[hasDefault];
-          } else {
-            this.hasAddress = false;
-          }
-          resolve();
-        })
+        this.$api
+          .get('/user/address/list', {
+            pageNum: 1,
+            pageSize: 100,
+            userId: this.$store.state.user.userId
+          })
+          .then(res => {
+            let hasDefault = this.findElem(res.data.records, 'defaultAddr', true)
+            if (hasDefault >= 0) {
+              this.hasAddress = true
+              this.addressInfo = res.data.records[hasDefault]
+            } else {
+              this.hasAddress = false
+            }
+            resolve()
+          })
       })
     },
 
     findElem(array, attr, val) {
       for (var i = 0; i < array.length; i++) {
         if (array[i][attr] == val) {
-          return i; //返回当前索引值
+          return i //返回当前索引值
         }
       }
-      return -1;
+      return -1
     },
 
     // 去选择优惠券
     chooseCoupon() {
       // if(this.isSeckill) return this.$toast('秒杀商品不可使用优惠券');
-      let goodsIds = [];
+      let goodsIds = []
       this.goodsList.forEach(item => {
         goodsIds.push(item.goodsId)
       })
 
-      let amount = Number(this.orderInfo.totalAmount) + Number(this.freight);
+      let amount = Number(this.orderInfo.totalAmount) + Number(this.freight)
 
       this.$navToPage({
         url: '/packageGoods/pages/coupon?orderAmount=' + amount + '&goodsIds=' + goodsIds.join(',')
@@ -384,186 +441,221 @@ export default {
 
     // 更改数量
     changeCount(e, index) {
-      this.buyList[index].num = e.value;
-      this.getOrderInfo();
+      this.buyList[index].num = e.value
+      this.getOrderInfo()
     },
 
     // 获取以旧换新信息
     getTradeInfo() {
-      this.$api.get('/trade/orderCategoryItem', {
-        ids: this.tradeIds
-      }).then(res => {
-        this.tradeInfo = res.data;
-      })
+      this.$api
+        .get('/trade/orderCategoryItem', {
+          ids: this.tradeIds
+        })
+        .then(res => {
+          this.tradeInfo = res.data
+        })
     },
 
     // 提交订单
     submitOrder() {
-      let that = this;
-      if (!this.hasAddress) return this.$toast('请先选择收货地址');
+      let that = this
+      if (!this.hasAddress) return this.$toast('请先选择收货地址')
       if (!this.orderInfo.openId) {
-        return this.$navToPage({
-          url: '/pages/login/index?isNotOpenid=' + true
-        }, 'redirectTo')
+        return this.$navToPage(
+          {
+            url: '/pages/login/index?isNotOpenid=' + true
+          },
+          'redirectTo'
+        )
       }
 
-      this.orderPay();
+      this.orderPay()
     },
 
     // 下单支付
     orderPay() {
-      let that = this;
-      mini_env((bool) => {
-        let tradeIds = this.tradeIds ? this.tradeIds.split(',') : [];
-        this.$api.postJson('/order/buy', {
-          userId: this.$store.state.user.userId,
-          buyGoods: this.buyList,
-          buyerMsg: this.remark,
-          userAddressId: this.addressInfo.userAddressId,
-          userCouponId: this.hasCoupon ? this.couponInfo.id : '',
-          promotionGroupId: this.groupbuyId || '',
-          payTypeId: this.payType == 1 ? 'WECHAT' : 'STORE',
-          orderOldProductAdds: tradeIds.length > 0 ? {
-            id: tradeIds[0],
-            itemIds: tradeIds.slice(1)
-          } : null,
-          isOld: tradeIds.length > 0 ? 'YES' : 'NO',
-          // h5Pay: true
-          ...(() => {
-            if (bool) {
-              return {
-                miniPay: true,
-                openId: this.$store.state.user.miniOpenId
+      let that = this
+      mini_env(bool => {
+        let tradeIds = this.tradeIds ? this.tradeIds.split(',') : []
+        this.$api
+          .postJson('/order/buy', {
+            userId: this.$store.state.user.userId,
+            buyGoods: this.buyList,
+            buyerMsg: this.remark,
+            userAddressId: this.addressInfo.userAddressId,
+            userCouponId: this.hasCoupon ? this.couponInfo.id : '',
+            promotionGroupId: this.groupbuyId || '',
+            payTypeId: this.payType == 1 ? 'WECHAT' : 'STORE',
+            orderOldProductAdds:
+              tradeIds.length > 0
+                ? {
+                    id: tradeIds[0],
+                    itemIds: tradeIds.slice(1)
+                  }
+                : null,
+            isOld: tradeIds.length > 0 ? 'YES' : 'NO',
+            // h5Pay: true
+            ...(() => {
+              if (bool) {
+                return {
+                  miniPay: true,
+                  openId: this.$store.state.user.miniOpenId
+                }
               }
+              return {}
+            })()
+          })
+          .then(res => {
+            if (res.code === 1100) {
+              return that.$tips(res.message)
             }
-            return {}
-          })()
-        }).then(res => {
-          if (res.code === 1100) {
-            return that.$tips(res.message);
-          }
-          // 不需要支付
-          if (res.data.isPay === false) {
-            that.$successToast('购买成功');
-            that.orderId = res.data.id;
-            setTimeout(() => {
-              that.$navToPage({
-                url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
-              }, 'reLaunch');
-            }, 1000)
-          }
-          // 需要支付
-          else {
-            // 小程序环境
-            if (bool) {
-              uniWebview.navigateTo({
-                url: `/pages/pay/pay?${Object.entries({
-                  ...res.data,
-                  payPackage: res.data.payPackage.split("=")[0] || "",
-                  payPackageVal: res.data.payPackage.split("=")[1] || ""
-                }).map(item => item.join("=")).join("&")}`
-              })
+            // 不需要支付
+            if (res.data.isPay === false) {
+              that.$successToast('购买成功')
+              that.orderId = res.data.id
+              setTimeout(() => {
+                that.$navToPage(
+                  {
+                    url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
+                  },
+                  'reLaunch'
+                )
+              }, 1000)
             }
-            // h5环境
+            // 需要支付
             else {
-              weixinPay(res.data, function (res) {
-                that.$successToast('购买成功');
-                that.orderId = res.data.id;
-                setTimeout(() => {
-                  that.$navToPage({
-                    url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
-                  }, 'reLaunch');
-                }, 1000)
-              })
+              // 小程序环境
+              if (bool) {
+                uniWebview.navigateTo({
+                  url: `/pages/pay/pay?${Object.entries({
+                    ...res.data,
+                    payPackage: res.data.payPackage.split('=')[0] || '',
+                    payPackageVal: res.data.payPackage.split('=')[1] || ''
+                  })
+                    .map(item => item.join('='))
+                    .join('&')}`
+                })
+              }
+              // h5环境
+              else {
+                weixinPay(res.data, function (res) {
+                  that.$successToast('购买成功')
+                  that.orderId = res.data.id
+                  setTimeout(() => {
+                    that.$navToPage(
+                      {
+                        url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
+                      },
+                      'reLaunch'
+                    )
+                  }, 1000)
+                })
+              }
             }
-          }
-        })
+          })
       })
     },
 
     // 消息推送
     requestMessage() {
-      let that = this;
+      let that = this
       uni.showModal({
         title: '温馨提示',
         content: '为更好的促进您与买家的交流,需要在您的订单成交时向您发送消息',
-        confirmText: "同意",
-        cancelText: "拒绝",
+        confirmText: '同意',
+        cancelText: '拒绝',
         success: function (res) {
           if (res.confirm) {
-            let tmplIds = [that.configInfo.template];
+            let tmplIds = [that.configInfo.template]
             uni.requestSubscribeMessage({
               tmplIds: tmplIds,
               success(res) {
-                let status = null;
+                let status = null
                 tmplIds.map((item, index) => {
                   if (res[item] == 'accept') {
-                    status = 'accept';
+                    status = 'accept'
                   }
                 })
                 if (status == 'accept') {
-                  that.$successToast('订阅成功');
+                  that.$successToast('订阅成功')
                 } else {
-                  that.$toast('订阅取消');
+                  that.$toast('订阅取消')
                 }
                 setTimeout(() => {
-                  that.$navToPage({
-                    url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
-                  }, 'reLaunch');
+                  that.$navToPage(
+                    {
+                      url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
+                    },
+                    'reLaunch'
+                  )
                 }, 1000)
               },
               fail(res) {
-                console.log(res);
-                that.$toast('订阅失败');
+                console.log(res)
+                that.$toast('订阅失败')
                 setTimeout(() => {
-                  that.$navToPage({
-                    url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
-                  }, 'reLaunch');
+                  that.$navToPage(
+                    {
+                      url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
+                    },
+                    'reLaunch'
+                  )
                 }, 1000)
               }
             })
           } else if (res.cancel) {
-            that.$modal({
-              title: '温馨提示',
-              content: '拒绝后您将无法获取实时的与卖家(买家)的交易消息',
-              confirmText: "知道了",
-              showCancel: false
-            }).then(() => {
-              that.$navToPage({
-                url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
-              }, 'reLaunch');
-            }).catch(() => { })
+            that
+              .$modal({
+                title: '温馨提示',
+                content: '拒绝后您将无法获取实时的与卖家(买家)的交易消息',
+                confirmText: '知道了',
+                showCancel: false
+              })
+              .then(() => {
+                that.$navToPage(
+                  {
+                    url: '/packageMine/pages/order/list?tab=DFH' + '&orderId=' + that.orderId
+                  },
+                  'reLaunch'
+                )
+              })
+              .catch(() => {})
           }
         }
-      });
+      })
     },
 
     // 代客下单
     replaceOrder() {
-      if (!this.hasAddress) this.$toast('请先选择收货地址');
-
-      let tradeIds = this.tradeIds ? this.tradeIds.split(',') : [];
-      this.$api.postJson('/order/buy', {
-        userId: this.$store.state.user.userId,
-        buyGoods: this.buyList,
-        buyerMsg: this.remark,
-        userAddressId: this.addressInfo.userAddressId,
-        userCouponId: this.hasCoupon ? this.couponInfo.id : '',
-        proxyUser: true,
-        payTypeId: this.payType == 1 ? 'WECHAT' : 'STORE',
-        orderOldProductAdds: tradeIds.length > 0 ? {
-          id: tradeIds[0],
-          itemIds: tradeIds.slice(1)
-        } : null,
-        isOld: tradeIds.length > 0 ? 'YES' : 'NO'
-      }).then(res => {
-        if (res.code === 1100) {
-          return this.$tips(res.message);
-        }
-        this.codeUrl = res.data.codeUrl.replace(/[\r\n]/g, "");
-        this.isCodeDialog = true;
-      })
-    },
+      if (!this.hasAddress) this.$toast('请先选择收货地址')
+
+      let tradeIds = this.tradeIds ? this.tradeIds.split(',') : []
+      this.$api
+        .postJson('/order/buy', {
+          userId: this.$store.state.user.userId,
+          buyGoods: this.buyList,
+          buyerMsg: this.remark,
+          userAddressId: this.addressInfo.userAddressId,
+          userCouponId: this.hasCoupon ? this.couponInfo.id : '',
+          proxyUser: true,
+          payTypeId: this.payType == 1 ? 'WECHAT' : 'STORE',
+          orderOldProductAdds:
+            tradeIds.length > 0
+              ? {
+                  id: tradeIds[0],
+                  itemIds: tradeIds.slice(1)
+                }
+              : null,
+          isOld: tradeIds.length > 0 ? 'YES' : 'NO'
+        })
+        .then(res => {
+          if (res.code === 1100) {
+            return this.$tips(res.message)
+          }
+          this.codeUrl = res.data.codeUrl.replace(/[\r\n]/g, '')
+          this.isCodeDialog = true
+        })
+    }
   }
 }
 </script>
@@ -575,14 +667,14 @@ export default {
 
 .card {
   @include zj-card;
-  background: #FFFFFF;
+  background: #ffffff;
   border-radius: 20rpx;
   margin-top: 20rpx;
   padding: 0 20rpx;
 }
 
 .address-container {
-  background: #FFFFFF;
+  background: #ffffff;
   border-radius: 20rpx;
   display: flex;
   justify-content: space-between;
@@ -657,7 +749,7 @@ export default {
     padding: 20rpx 0;
     display: flex;
     align-items: center;
-    background: #FFFFFF;
+    background: #ffffff;
     border-bottom: 1px solid #eaeaea;
 
     &:last-child {
@@ -770,7 +862,7 @@ export default {
       padding: 10rpx 16rpx;
       font-size: 24rpx;
       color: $theme-color;
-      background: #E6F0FF;
+      background: #e6f0ff;
       border-radius: 5rpx;
     }
   }
@@ -792,8 +884,8 @@ export default {
       font-size: 28rpx;
       color: #333333;
       text {
-      	color: #999999;
-      	margin-left: 20rpx;
+        color: #999999;
+        margin-left: 20rpx;
       }
     }
 
@@ -856,9 +948,9 @@ export default {
     }
 
     .price {
-    	font-size: 28rpx;
-    	color: $minor-color;
-    	font-weight: 600;
+      font-size: 28rpx;
+      color: $minor-color;
+      font-weight: 600;
     }
   }
 }
@@ -900,7 +992,7 @@ export default {
       .it-2 {
         display: flex;
         align-items: center;
-        color: #FF3F42;
+        color: #ff3f42;
 
         text {
           font-size: 28rpx;
@@ -931,7 +1023,7 @@ export default {
   left: 150rpx;
   z-index: 999;
   width: 400rpx;
-  background: #FFFFFF;
+  background: #ffffff;
   border-radius: 10rpx;
   box-sizing: border-box;
   padding: 20rpx 20rpx 40rpx;
@@ -982,7 +1074,7 @@ export default {
 
   .dialog {
     width: 600rpx;
-    background: #FFFFFF;
+    background: #ffffff;
     border-radius: 20rpx;
     overflow: hidden;
 
@@ -1008,7 +1100,7 @@ export default {
         input {
           flex: 1;
           height: 50rpx;
-          border: 1px solid #E5E5E5;
+          border: 1px solid #e5e5e5;
           margin-right: 16rpx;
           padding: 0 12rpx;
           font-size: 28rpx;
@@ -1020,7 +1112,7 @@ export default {
       border-top: 1px solid #eaeaea;
       display: flex;
 
-      &>view {
+      & > view {
         flex: 1;
         text-align: center;
         line-height: 100rpx;
@@ -1031,12 +1123,11 @@ export default {
         }
 
         &.right {
-          color: #FFFFFF;
-          background: #FF3F42;
+          color: #ffffff;
+          background: #ff3f42;
         }
       }
     }
   }
-
 }
 </style>

+ 827 - 812
src/packageMine/pages/groupbuy/list.vue

@@ -1,820 +1,835 @@
 <template>
-	<view class="app-container">
-		<view class="fixed-container">
-			<view class="top-container">
-				<scroll-view
-					:scroll-x="true"
-					:scroll-left="scrollLeft"
-					scroll-with-animation
-					:show-scrollbar="false"
-					class="tabs-view"
-					ref="tabs-view">
-					<view class="tab">
-						<block v-for="(item, index) in tabList" :key='index'>
-							<view class="item" :ref="`tabs-item-${index}`" :class="[`tabs-item-${index}`, item.categoryId == tabCurrent ? 'current':'']" @tap="changeTab(item.categoryId)">{{item.name}}</view>
-						</block>
-					</view>
-				</scroll-view>
-			</view>
-			<view class="search-container">
-				<view class="search">
-					<image src="/static/icon/search.png" class=""></image>
-					<input type="text" confirm-type="search" placeholder="搜索商品名称" v-model="keyword" @confirm="searchSubmit">
-				</view>
-			</view>
-		</view>
-		
-		<view class="banner-container" v-if="bannerUrl">
-			<image :src="bannerUrl" mode="widthFix"></image>
-		</view>
-		
-		<view class="list-container">
-			<block v-for="(item, index) in dataList" :key='index'>
-				<div class="item" @tap="toGoodsDetail(item.goodsId)">
-					<image :src="item.goodsImgSrc" mode="aspectFill"></image>
-					<view class="right">
-						<view class="title ellipsis-2">{{item.goodsName}}</view>
-						<view class="des ellipsis-2">{{item.describeText ? item.describeText : ''}}</view>
-						<view class="stock-sales">
-							<view class="stock">
-								<text>剩余{{item.stock}}件</text>
-								<view class="progress-box">
-									<!-- 库存 / 总数 * 100 = 剩余百分比 -->
-									<progress :percent="item.stock / (item.stock+100) * 100" activeColor="#FF3F42" active stroke-width="6" />
-								</view>
-							</view>
-							<view class="sales">销量:{{item.saleNum || '0'}}</view>
-						</view>
-						<view class="bottom">
-							<view class="price">
-								<view class="price-1">¥{{item.groupPrice | numToFixed}}</view>
-								<view class="price-2">¥{{item.orgGoodsPrice | numToFixed}}</view>
-							</view>
-							<view class="btn">去拼团</view>
-						</view>
-					</view>
-				</div>
-			</block>
-		</view>
-		<no-data v-if="!dataList.length" :showText="'暂无数据'"></no-data>
-		<loading-text v-if="dataList.length"  :loading="loading" :noMore="noMore" ></loading-text>
-		
-		<view class="share-container" :style="{top: top+'px'}" v-if="dataList.length">
-			<button @tap="clickShare">
-				<image src="@/static/icon/share.png"></image>
-				<text>分享</text>
-			</button>
-		</view>
-		
-		<view class="global-mask" v-show="isShareDialog" @tap="isShareDialog = false"></view>
-		<view class="sharelist-container" v-show="isShareDialog">
-			<button class="item" open-type="share" @tap="isShareDialog = false">
-				<image src="@/static/icon/wechat.png"></image>
-				<text>分享给微信好友</text>
-			</button>
-			
-			<view class="item" @tap="markImage">
-				<image src="@/static/icon/image.png"></image>
-				<text>生成图片分享</text>
-			</view>
-		</view>
-		
-		<view class="global-mask" v-show="isShowCanvas" @tap="closeCanvas"></view>
-		<view class="canvas-container" v-show="isShowCanvas">
-			<view class="content">
-				<canvas style="width: 340px; height: 340px;" canvas-id="myCanvas" id="myCanvas"></canvas>
-			</view>
-			<view class="button"><text @tap="saveImage">保存图片</text></view>
-		</view>
-		
-		<!-- <drag-button :isDock="true" :customBar="true" ref="dragButton"></drag-button> -->
-	</view>
+  <view class="app-container">
+    <view class="fixed-container">
+      <view class="top-container">
+        <scroll-view
+          :scroll-x="true"
+          :scroll-left="scrollLeft"
+          scroll-with-animation
+          :show-scrollbar="false"
+          class="tabs-view"
+          ref="tabs-view"
+        >
+          <view class="tab">
+            <block v-for="(item, index) in tabList" :key="index">
+              <view
+                class="item"
+                :ref="`tabs-item-${index}`"
+                :class="[`tabs-item-${index}`, item.categoryId == tabCurrent ? 'current' : '']"
+                @tap="changeTab(item.categoryId)"
+                >{{ item.name }}</view
+              >
+            </block>
+          </view>
+        </scroll-view>
+      </view>
+      <view class="search-container">
+        <view class="search">
+          <image src="/static/icon/search.png" class=""></image>
+          <input
+            type="text"
+            confirm-type="search"
+            placeholder="搜索商品名称"
+            v-model="keyword"
+            @confirm="searchSubmit"
+          />
+        </view>
+      </view>
+    </view>
+
+    <view class="banner-container" v-if="bannerUrl">
+      <image :src="bannerUrl" mode="widthFix"></image>
+    </view>
+
+    <view class="list-container">
+      <block v-for="(item, index) in dataList" :key="index">
+        <div class="item" @tap="toGoodsDetail(item.goodsId)">
+          <image :src="item.goodsImgSrc" mode="aspectFill"></image>
+          <view class="right">
+            <view class="title ellipsis-2">{{ item.goodsName }}</view>
+            <view class="des ellipsis-2">{{ item.describeText ? item.describeText : '' }}</view>
+            <view class="stock-sales">
+              <view class="stock">
+                <text>剩余{{ item.stock }}件</text>
+                <view class="progress-box">
+                  <!-- 库存 / 总数 * 100 = 剩余百分比 -->
+                  <progress
+                    :percent="(item.stock / (item.stock + 100)) * 100"
+                    activeColor="#FF3F42"
+                    active
+                    stroke-width="6"
+                  />
+                </view>
+              </view>
+              <view class="sales">销量:{{ item.saleNum || '0' }}</view>
+            </view>
+            <view class="bottom">
+              <view class="price">
+                <view class="price-1">¥{{ item.groupPrice | numToFixed }}</view>
+                <view class="price-2">¥{{ item.orgGoodsPrice | numToFixed }}</view>
+              </view>
+              <view class="btn">去拼团</view>
+            </view>
+          </view>
+        </div>
+      </block>
+    </view>
+    <no-data v-if="!dataList.length" :showText="'暂无数据'"></no-data>
+    <loading-text v-if="dataList.length" :loading="loading" :noMore="noMore"></loading-text>
+
+    <view class="share-container" :style="{ top: top + 'px' }" v-if="dataList.length">
+      <button @tap="clickShare">
+        <image src="@/static/icon/share.png"></image>
+        <text>分享</text>
+      </button>
+    </view>
+
+    <view class="global-mask" v-show="isShareDialog" @tap="isShareDialog = false"></view>
+    <view class="sharelist-container" v-show="isShareDialog">
+      <button class="item" open-type="share" @tap="isShareDialog = false">
+        <image src="@/static/icon/wechat.png"></image>
+        <text>分享给微信好友</text>
+      </button>
+
+      <view class="item" @tap="markImage">
+        <image src="@/static/icon/image.png"></image>
+        <text>生成图片分享</text>
+      </view>
+    </view>
+
+    <view class="global-mask" v-show="isShowCanvas" @tap="closeCanvas"></view>
+    <view class="canvas-container" v-show="isShowCanvas">
+      <view class="content">
+        <canvas style="width: 340px; height: 340px" canvas-id="myCanvas" id="myCanvas"></canvas>
+      </view>
+      <view class="button"><text @tap="saveImage">保存图片</text></view>
+    </view>
+
+    <!-- <drag-button :isDock="true" :customBar="true" ref="dragButton"></drag-button> -->
+  </view>
 </template>
 
 <script>
-	import {mapState} from 'vuex';
-	// import dragButton from '@/components/drag-button.vue';
-	
-	export default {
-		// components:{
-		// 	dragButton
-		// },
-		data() {
-			return {
-				configInfo: {},
-				dataList: [], // 优惠券列表
-				pageNum: 1,
-				pageSize: 8,
-				noMore: false,
-				loading: false,
-				isShareDialog: false, // 是否显示分享弹窗
-				isShowCanvas: false, // 是否显示海报弹窗
-				isFinishCanvas: false, // 是否已完成海报
-				codeUrl: '',
-				bgUrl: '',
-				headUrl: '',
-				top: 300,
-				tabList: [], // 分类列表
-				tabCurrent: '', // 分类当前值
-				keyword: '',
-				
-				scrollLeft: 50,
-				scrollViewWidth: 0,
-				tabsRect: {
-					left: 0
-				},
-				
-				bannerUrl: '',
-			}
-		},
-		
-		watch: {
-			tabList() {
-				this.$nextTick(() => {
-					this.resize()
-				})
-			},
-		},
-		
-		computed:{
-			...mapState(['userInfo', 'isLogin', 'userId'])
-		},
-		
-		onShow() {
-			// this.$refs.dragButton.init();
-			
-			this.top = this.$getStorage('top') < 200 ? this.$getStorage('top') : this.$getStorage('top') - 124;
-		},
-		
-		async onLoad() {
-			this.getTabList();
-			this.getBanner();
-      this.configInfo = await this.$getConfigInfo();
-		},
-		
-		onShow() {
-			this.crossPage.$on('hanbleShare', () => {
-				this.clickShare();
-			})
-		},
-		
-		onHide() {
-			this.crossPage.$off('hanbleShare');
-		},
-		
-		// 下拉刷新
-		onPullDownRefresh() {
-			this.pageNum = 1;
-			this.getList();
-		},
-		
-		// 上拉加载
-		onReachBottom() {
-			this.getList(1);
-		},
-		
-		onShareAppMessage(options) {
-			if (options && options.from == 'button') {
-				// 来自页面内的转发按钮
-			} else {
-				// 点击微信右上角的分享按钮
-			}
-			return {
-				title: `${this.userInfo.nickName}向你推荐了${this.configInfo.minAppName}的团购活动`,
-				// imageUrl: this.detail.imgUrl,
-				path: '/pages/index/index?serviceId=' + this.userId + '&otherType=groupbuyList',
-				query: {
-					// id: this.goodsId,
-				},
-				success: function(res) {
-					if(res.errMsg == 'shareAppMessage:ok'){
-						this.$successToast('分享完成');
-					}
-				}
-			}
-		},
-		
-		methods: {
-			getList(loadMore) {
-				if(this.noMore && loadMore)return;
-				this.noMore = false
-				if(!loadMore){
-					this.pageNum = 1;
-				}else{
-					this.loading = true;
-				}
-				this.$axios({
-					url: '/goods/promotion/group/list',
-					method: 'get',
-					params: {
-						pageNo: this.pageNum,
-						pageSize: this.pageSize,
-						userId: this.userId,
-						goodsCategoryId: this.tabCurrent,
-						keyword: this.keyword,
-					},
-					isLoading: !loadMore
-				}).then(res => {
-					let _list = res.data.records;
-					let pageTotal = res.data.pages;
-					if(this.pageNum >= pageTotal){
-						this.noMore = true;
-					}
-					if (_list.length) {
-						this.pageNum += 1
-					}
-					if (loadMore) {
-						this.dataList = this.dataList.concat(_list);
-						this.loading = false;
-					} else {
-						this.dataList = _list;
-					}
-					
-					uni.stopPullDownRefresh();
-				})
-			},
-			
-			// 获取一级菜单
-			getTabList() {
-				this.$axios({
-					url: '/goods/category/list',
-					method: 'get',
-					params: {}
-				}).then(res => {
-					res.data.unshift({name: "全部", categoryId: ""})
-					this.tabList = res.data;
-					this.tabCurrent = res.data.length > 0 ? res.data[0].categoryId : 0;
-					this.getList();
-				})
-			},
-			
-			// 切换一级菜单
-			changeTab(current) {
-				this.pageNum = 1;
-				this.tabCurrent = current;
-				this.resize();
-				this.getList();
-			},
-			
-			searchSubmit() {
-				this.pageNum = 1;
-				this.getList();
-			},
-			
-			setScrollLeft() {
-				// 当前活动tab的布局信息,有tab菜单的width和left(为元素左边界到父元素左边界的距离)等信息
-				const index = this.findElem(this.tabList, 'categoryId', this.tabCurrent);
-				const tabRect = this.tabList[index]
-				// 累加得到当前item到左边的距离
-				const offsetLeft = this.tabList
-					.slice(0, index)
-					.reduce((total, curr) => {
-						return total + curr.rect.width
-					}, 0)
-				// 此处为屏幕宽度
-				const res = uni.getSystemInfoSync();
-				const windowWidth = res.windowWidth;
-				// 将活动的tabs-item移动到屏幕正中间,实际上是对scroll-view的移动
-				let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2
-				
-				// 这里做一个限制,限制scrollLeft的最大值为整个scroll-view宽度减去tabs组件的宽度
-				scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width)
-				this.scrollLeft = Math.max(0, scrollLeft)
-			},
-			// 获取所有标签的尺寸
-			resize() {
-				// 如果不存在list,则不处理
-				if(this.tabList.length === 0) {
-					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.tabList[index].rect = item
-					})
-					// 获取了tabs的尺寸之后,设置滑块的位置
-					this.setScrollLeft()
-				})
-			},
-			// 获取导航菜单的尺寸
-			getTabsRect() {
-				return new Promise(resolve => {
-					this.queryRect('tabs-view').then(size => resolve(size))
-				})
-			},
-			// 获取所有标签的尺寸
-			getAllItemRect() {
-				return new Promise(resolve => {
-					const promiseAllArr = this.tabList.map((item, index) => this.queryRect(
-						`tabs-item-${index}`, true))
-					Promise.all(promiseAllArr).then(sizes => resolve(sizes))
-				})
-			},
-			// 获取各个标签的尺寸
-			queryRect(el, item) {
-				const query = uni.createSelectorQuery().in(this);
-				return new Promise(resolve => {
-					query.select(`.${el}`).boundingClientRect(data => {
-						resolve(data)
-					}).exec();
-				})
-			},
-			
-			findElem(array, attr, val) {
-			    for (var i = 0; i < array.length; i++) {
-			        if (array[i][attr] == val) {
-			            return i; //返回当前索引值
-			        }
-			    }
-			    return -1;
-			},
-			
-			// 进入商品详情
-			toGoodsDetail(id) {
-				if(!id) {
-					return false;
-				}
-				uni.navigateTo({
-					url: '/packageGoods/pages/detail?id=' + id
-				})
-			},
-			
-			// 获取海报图
-			getBanner() {
-				this.$axios({
-					url: '/goods/promotion/share/qrcode',
-					method: 'get',
-					params: {
-						userId: this.userId,
-					}
-				}).then(res => {
-					this.bannerUrl = res.data.posterImgUrl;
-				})
-			},
-			
-			// 点击分享
-			clickShare() {
-				if(!this.isLogin) {
-					return uni.navigateTo({
-						url: '/pages/login/index'
-					})
-				}
-				this.getCode();
-				this.isShareDialog = true;
-			},
-			
-			// 获取二维码
-			getCode() {
-				let that = this;
-				this.$axios({
-					url: '/goods/promotion/share/qrcode',
-					method: 'get',
-					params: {
-						userId: this.userId,
-					}
-				}).then(res => {
-					if(res.data) {
-						// this.codeUrl = res.data.qrcode;
-						// this.bgUrl = res.data.promotionImgUrl;
-						if(!this.isFinishCanvas) {
-							uni.downloadFile({
-							    url: res.data.promotionImgUrl,
-							    success: function (fileRes) {
-									that.bgUrl = fileRes.tempFilePath;
-								}
-							})
-							uni.downloadFile({
-							    url: res.data.qrcode,
-							    success: function (fileRes) {
-									that.codeUrl = fileRes.tempFilePath;
-								}
-							})
-							uni.downloadFile({
-							    url: that.userInfo.avatar.indexOf('http') >= 0 ? that.userInfo.avatar : (that.$imageUrl + that.userInfo.avatar),
-							    success: function (fileRes) {
-									that.headUrl = fileRes.tempFilePath;
-								}
-							})
-						}
-					}
-				})
-			},
-			
-			// 生成图片
-			markImage() {
-				if(!this.bgUrl || !this.codeUrl || !this.headUrl) {
-					this.getCode();
-					return this.$toast('生成失败,请重新操作');
-				}
-				
-				let that = this;
-				this.isShareDialog = false;
-				this.isShowCanvas = true;
-				
-				if(this.isFinishCanvas) {
-					return false;
-				}
-				
-				uni.showLoading({
-				    title: '海报生成中'
-				});
-				
-				let codeUrl = this.codeUrl;
-				let bgUrl = this.bgUrl;
-				let headUrl = this.headUrl;
-				
-				// this.userInfo.nickName = '阿里巴巴的的';
-				let name = this.userInfo.nickName.length > 4 ? this.userInfo.nickName.slice(0, 4) + '...' : this.userInfo.nickName;
-				
-				var ctx = uni.createCanvasContext('myCanvas');
-				
-				// 背景图片
-				ctx.drawImage(bgUrl, 0, 0, 340, 340)
-				
-				// 二维码
-				this.circleImgOne(ctx, codeUrl, 260, 260, uni.upx2px(70));
-				// ctx.drawImage(codeUrl, 260, 260, 70, 70)
-				
-				// 矩形
-				// ctx.setFillStyle('rgba(0,0,0,0.4)')
-				// ctx.fillRect(185, 10, 145, 30)
-				
-				// 圆角矩形
-				this.fillRoundRect(ctx, 175, 10, 155, 30, 15, 'rgba(0,0,0,0.4)');
-				
-				// 头像
-				// this.circleImgOne(ctx, headUrl, 200, 10, 15);
-				ctx.drawImage(headUrl, 187, 12, 26, 26)
-				
-				// 文字
-				ctx.setFontSize(12)
-				ctx.setFillStyle('#FFFFFF')
-				ctx.fillText(name+'向你推荐', 217, 30)
-				
-				ctx.draw()
-				uni.hideLoading();
-				this.isFinishCanvas = true;
-			},
-			
-			// ctx=Canvas实例, img=图片地址, x=x轴坐标, y=y轴坐标, r=圆形半径
-			circleImgOne(ctx, img, x, y, r) {
-				// 如果在绘制图片之后还有需要绘制别的元素,需启动 save() 、restore() 方法,否则 clip() 方法会导致之后元素都不可见
-				// save():保存当前 Canvas 画布状态
-				// restore():恢复到保存时的状态
-				ctx.save();
-				let d = r * 2;
-				let cx = x + r;
-				let cy = y + r;
-				ctx.arc(cx, cy, r, 0, 2 * Math.PI);
-				ctx.strokeStyle = '#FFFFFF'; // 设置绘制圆形边框的颜色
-				ctx.stroke(); // 绘制出圆形,默认为黑色,可通过 ctx.strokeStyle = '#FFFFFF', 设置想要的颜色
-				ctx.clip();
-				ctx.drawImage(img, x, y, d, d);
-				ctx.restore();
-			},
-			
-			/**该方法用来绘制一个有填充色的圆角矩形 
-				*@param cxt:canvas的上下文环境 
-				*@param x:左上角x轴坐标 
-				*@param y:左上角y轴坐标 
-				*@param width:矩形的宽度 
-				*@param height:矩形的高度 
-				*@param radius:圆的半径 
-				*@param fillColor:填充颜色 
-			 **/
-			fillRoundRect(cxt, x, y, width, height, radius, fillColor) {
-				//圆的直径必然要小于矩形的宽高          
-				if (2 * radius > width || 2 * radius > height) { return false; }
-		
-				cxt.save();
-				cxt.translate(x, y);
-				//绘制圆角矩形的各个边
-				this.drawRoundRectPath(cxt, width, height, radius);
-				cxt.fillStyle = fillColor;
-				cxt.fill();
-				cxt.restore();
-			},
-			
-			drawRoundRectPath(cxt, width, height, radius) {
-				cxt.beginPath(0);
-				//从右下角顺时针绘制,弧度从0到1/2PI  
-				cxt.arc(width - radius, height - radius, radius, 0, Math.PI / 2);
-				//矩形下边线
-				cxt.lineTo(radius, height);
-				//左下角圆弧,弧度从1/2PI到PI
-				cxt.arc(radius, height - radius, radius, Math.PI / 2, Math.PI);
-				//矩形左边线
-				cxt.lineTo(0, radius);
-				//左上角圆弧,弧度从PI到3/2PI  
-				cxt.arc(radius, radius, radius, Math.PI, Math.PI * 3 / 2);
-				//上边线  
-				cxt.lineTo(width - radius, 0);
-				//右上角圆弧  
-				cxt.arc(width - radius, radius, radius, Math.PI * 3 / 2, Math.PI * 2);
-				//右边线  
-				cxt.lineTo(width, height - radius);
-				cxt.closePath();
-			},
-			
-			// 保存图片
-			saveImage() {
-				let that = this;
-				uni.canvasToTempFilePath({
-					x: 0,
-					y: 0,
-					width: 340,
-					height: 340,
-					canvasId: 'myCanvas',
-					success: function(res) {
-						uni.saveImageToPhotosAlbum({
-							filePath: res.tempFilePath,
-							success: function () {
-								that.$successToast('保存成功');
-							}
-						});
-					} 
-				})
-			},
-			
-			// 关闭canvas
-			closeCanvas() {
-				this.isShowCanvas = false;
-				uni.hideLoading();
-			},
-			
-		}
-	}
+import { mapState } from 'vuex'
+// import dragButton from '@/components/drag-button.vue';
+
+export default {
+  // components:{
+  // 	dragButton
+  // },
+  data() {
+    return {
+      configInfo: {},
+      dataList: [], // 优惠券列表
+      pageNum: 1,
+      pageSize: 8,
+      noMore: false,
+      loading: false,
+      isShareDialog: false, // 是否显示分享弹窗
+      isShowCanvas: false, // 是否显示海报弹窗
+      isFinishCanvas: false, // 是否已完成海报
+      codeUrl: '',
+      bgUrl: '',
+      headUrl: '',
+      top: 300,
+      tabList: [], // 分类列表
+      tabCurrent: '', // 分类当前值
+      keyword: '',
+
+      scrollLeft: 50,
+      scrollViewWidth: 0,
+      tabsRect: {
+        left: 0
+      },
+
+      bannerUrl: ''
+    }
+  },
+
+  watch: {
+    tabList() {
+      this.$nextTick(() => {
+        this.resize()
+      })
+    }
+  },
+
+  computed: {
+    ...mapState(['userInfo', 'isLogin', 'userId'])
+  },
+
+  onShow() {
+    // this.$refs.dragButton.init();
+
+    this.top = this.$getStorage('top') < 200 ? this.$getStorage('top') : this.$getStorage('top') - 124
+  },
+
+  async onLoad() {
+    this.getTabList()
+    this.getBanner()
+    this.configInfo = await this.$getConfigInfo()
+  },
+
+  onShow() {
+    this.crossPage.$on('hanbleShare', () => {
+      this.clickShare()
+    })
+  },
+
+  onHide() {
+    this.crossPage.$off('hanbleShare')
+  },
+
+  // 下拉刷新
+  onPullDownRefresh() {
+    this.pageNum = 1
+    this.getList()
+  },
+
+  // 上拉加载
+  onReachBottom() {
+    this.getList(1)
+  },
+
+  onShareAppMessage(options) {
+    if (options && options.from == 'button') {
+      // 来自页面内的转发按钮
+    } else {
+      // 点击微信右上角的分享按钮
+    }
+    return {
+      title: `${this.userInfo.nickName}向你推荐了${this.configInfo.minAppName}的团购活动`,
+      // imageUrl: this.detail.imgUrl,
+      path: '/pages/index/index?serviceId=' + this.userId + '&otherType=groupbuyList',
+      query: {
+        // id: this.goodsId,
+      },
+      success: function (res) {
+        if (res.errMsg == 'shareAppMessage:ok') {
+          this.$successToast('分享完成')
+        }
+      }
+    }
+  },
+
+  methods: {
+    getList(loadMore) {
+      if (this.noMore && loadMore) return
+      this.noMore = false
+      if (!loadMore) {
+        this.pageNum = 1
+      } else {
+        this.loading = true
+      }
+      this.$api
+        .get('/goods/promotion/group/list', {
+          pageNo: this.pageNum,
+          pageSize: this.pageSize,
+          userId: this.userId,
+          goodsCategoryId: this.tabCurrent,
+          keyword: this.keyword
+        })
+        .then(res => {
+          let _list = res.data.records
+          let pageTotal = res.data.pages
+          if (this.pageNum >= pageTotal) {
+            this.noMore = true
+          }
+          if (_list.length) {
+            this.pageNum += 1
+          }
+          if (loadMore) {
+            this.dataList = this.dataList.concat(_list)
+            this.loading = false
+          } else {
+            this.dataList = _list
+          }
+
+          uni.stopPullDownRefresh()
+        })
+    },
+
+    // 获取一级菜单
+    getTabList() {
+      this.$api.get('/goods/category/list', {}).then(res => {
+        res.data.unshift({ name: '全部', categoryId: '' })
+        this.tabList = res.data
+        this.tabCurrent = res.data.length > 0 ? res.data[0].categoryId : 0
+        this.getList()
+      })
+    },
+
+    // 切换一级菜单
+    changeTab(current) {
+      this.pageNum = 1
+      this.tabCurrent = current
+      this.resize()
+      this.getList()
+    },
+
+    searchSubmit() {
+      this.pageNum = 1
+      this.getList()
+    },
+
+    setScrollLeft() {
+      // 当前活动tab的布局信息,有tab菜单的width和left(为元素左边界到父元素左边界的距离)等信息
+      const index = this.findElem(this.tabList, 'categoryId', this.tabCurrent)
+      const tabRect = this.tabList[index]
+      // 累加得到当前item到左边的距离
+      const offsetLeft = this.tabList.slice(0, index).reduce((total, curr) => {
+        return total + curr.rect.width
+      }, 0)
+      // 此处为屏幕宽度
+      const res = uni.getSystemInfoSync()
+      const windowWidth = res.windowWidth
+      // 将活动的tabs-item移动到屏幕正中间,实际上是对scroll-view的移动
+      let scrollLeft =
+        offsetLeft -
+        (this.tabsRect.width - tabRect.rect.width) / 2 -
+        (windowWidth - this.tabsRect.right) / 2 +
+        this.tabsRect.left / 2
+
+      // 这里做一个限制,限制scrollLeft的最大值为整个scroll-view宽度减去tabs组件的宽度
+      scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width)
+      this.scrollLeft = Math.max(0, scrollLeft)
+    },
+    // 获取所有标签的尺寸
+    resize() {
+      // 如果不存在list,则不处理
+      if (this.tabList.length === 0) {
+        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.tabList[index].rect = item
+        })
+        // 获取了tabs的尺寸之后,设置滑块的位置
+        this.setScrollLeft()
+      })
+    },
+    // 获取导航菜单的尺寸
+    getTabsRect() {
+      return new Promise(resolve => {
+        this.queryRect('tabs-view').then(size => resolve(size))
+      })
+    },
+    // 获取所有标签的尺寸
+    getAllItemRect() {
+      return new Promise(resolve => {
+        const promiseAllArr = this.tabList.map((item, index) => this.queryRect(`tabs-item-${index}`, true))
+        Promise.all(promiseAllArr).then(sizes => resolve(sizes))
+      })
+    },
+    // 获取各个标签的尺寸
+    queryRect(el, item) {
+      const query = uni.createSelectorQuery().in(this)
+      return new Promise(resolve => {
+        query
+          .select(`.${el}`)
+          .boundingClientRect(data => {
+            resolve(data)
+          })
+          .exec()
+      })
+    },
+
+    findElem(array, attr, val) {
+      for (var i = 0; i < array.length; i++) {
+        if (array[i][attr] == val) {
+          return i //返回当前索引值
+        }
+      }
+      return -1
+    },
+
+    // 进入商品详情
+    toGoodsDetail(id) {
+      if (!id) {
+        return false
+      }
+      uni.navigateTo({
+        url: '/packageGoods/pages/detail?id=' + id
+      })
+    },
+
+    // 获取海报图
+    getBanner() {
+      this.$api
+        .get('/goods/promotion/share/qrcode', {
+          userId: this.userId
+        })
+        .then(res => {
+          this.bannerUrl = res.data.posterImgUrl
+        })
+    },
+
+    // 点击分享
+    clickShare() {
+      if (!this.isLogin) {
+        return uni.navigateTo({
+          url: '/pages/login/index'
+        })
+      }
+      this.getCode()
+      this.isShareDialog = true
+    },
+
+    // 获取二维码
+    getCode() {
+      let that = this
+      this.$api
+        .get('/goods/promotion/share/qrcode', {
+          userId: this.userId
+        })
+        .then(res => {
+          if (res.data) {
+            // this.codeUrl = res.data.qrcode;
+            // this.bgUrl = res.data.promotionImgUrl;
+            if (!this.isFinishCanvas) {
+              uni.downloadFile({
+                url: res.data.promotionImgUrl,
+                success: function (fileRes) {
+                  that.bgUrl = fileRes.tempFilePath
+                }
+              })
+              uni.downloadFile({
+                url: res.data.qrcode,
+                success: function (fileRes) {
+                  that.codeUrl = fileRes.tempFilePath
+                }
+              })
+              uni.downloadFile({
+                url:
+                  that.userInfo.avatar.indexOf('http') >= 0
+                    ? that.userInfo.avatar
+                    : that.$imageUrl + that.userInfo.avatar,
+                success: function (fileRes) {
+                  that.headUrl = fileRes.tempFilePath
+                }
+              })
+            }
+          }
+        })
+    },
+
+    // 生成图片
+    markImage() {
+      if (!this.bgUrl || !this.codeUrl || !this.headUrl) {
+        this.getCode()
+        return this.$toast('生成失败,请重新操作')
+      }
+
+      let that = this
+      this.isShareDialog = false
+      this.isShowCanvas = true
+
+      if (this.isFinishCanvas) {
+        return false
+      }
+
+      uni.showLoading({
+        title: '海报生成中'
+      })
+
+      let codeUrl = this.codeUrl
+      let bgUrl = this.bgUrl
+      let headUrl = this.headUrl
+
+      // this.userInfo.nickName = '阿里巴巴的的';
+      let name = this.userInfo.nickName.length > 4 ? this.userInfo.nickName.slice(0, 4) + '...' : this.userInfo.nickName
+
+      var ctx = uni.createCanvasContext('myCanvas')
+
+      // 背景图片
+      ctx.drawImage(bgUrl, 0, 0, 340, 340)
+
+      // 二维码
+      this.circleImgOne(ctx, codeUrl, 260, 260, uni.upx2px(70))
+      // ctx.drawImage(codeUrl, 260, 260, 70, 70)
+
+      // 矩形
+      // ctx.setFillStyle('rgba(0,0,0,0.4)')
+      // ctx.fillRect(185, 10, 145, 30)
+
+      // 圆角矩形
+      this.fillRoundRect(ctx, 175, 10, 155, 30, 15, 'rgba(0,0,0,0.4)')
+
+      // 头像
+      // this.circleImgOne(ctx, headUrl, 200, 10, 15);
+      ctx.drawImage(headUrl, 187, 12, 26, 26)
+
+      // 文字
+      ctx.setFontSize(12)
+      ctx.setFillStyle('#FFFFFF')
+      ctx.fillText(name + '向你推荐', 217, 30)
+
+      ctx.draw()
+      uni.hideLoading()
+      this.isFinishCanvas = true
+    },
+
+    // ctx=Canvas实例, img=图片地址, x=x轴坐标, y=y轴坐标, r=圆形半径
+    circleImgOne(ctx, img, x, y, r) {
+      // 如果在绘制图片之后还有需要绘制别的元素,需启动 save() 、restore() 方法,否则 clip() 方法会导致之后元素都不可见
+      // save():保存当前 Canvas 画布状态
+      // restore():恢复到保存时的状态
+      ctx.save()
+      let d = r * 2
+      let cx = x + r
+      let cy = y + r
+      ctx.arc(cx, cy, r, 0, 2 * Math.PI)
+      ctx.strokeStyle = '#FFFFFF' // 设置绘制圆形边框的颜色
+      ctx.stroke() // 绘制出圆形,默认为黑色,可通过 ctx.strokeStyle = '#FFFFFF', 设置想要的颜色
+      ctx.clip()
+      ctx.drawImage(img, x, y, d, d)
+      ctx.restore()
+    },
+
+    /**该方法用来绘制一个有填充色的圆角矩形
+     *@param cxt:canvas的上下文环境
+     *@param x:左上角x轴坐标
+     *@param y:左上角y轴坐标
+     *@param width:矩形的宽度
+     *@param height:矩形的高度
+     *@param radius:圆的半径
+     *@param fillColor:填充颜色
+     **/
+    fillRoundRect(cxt, x, y, width, height, radius, fillColor) {
+      //圆的直径必然要小于矩形的宽高
+      if (2 * radius > width || 2 * radius > height) {
+        return false
+      }
+
+      cxt.save()
+      cxt.translate(x, y)
+      //绘制圆角矩形的各个边
+      this.drawRoundRectPath(cxt, width, height, radius)
+      cxt.fillStyle = fillColor
+      cxt.fill()
+      cxt.restore()
+    },
+
+    drawRoundRectPath(cxt, width, height, radius) {
+      cxt.beginPath(0)
+      //从右下角顺时针绘制,弧度从0到1/2PI
+      cxt.arc(width - radius, height - radius, radius, 0, Math.PI / 2)
+      //矩形下边线
+      cxt.lineTo(radius, height)
+      //左下角圆弧,弧度从1/2PI到PI
+      cxt.arc(radius, height - radius, radius, Math.PI / 2, Math.PI)
+      //矩形左边线
+      cxt.lineTo(0, radius)
+      //左上角圆弧,弧度从PI到3/2PI
+      cxt.arc(radius, radius, radius, Math.PI, (Math.PI * 3) / 2)
+      //上边线
+      cxt.lineTo(width - radius, 0)
+      //右上角圆弧
+      cxt.arc(width - radius, radius, radius, (Math.PI * 3) / 2, Math.PI * 2)
+      //右边线
+      cxt.lineTo(width, height - radius)
+      cxt.closePath()
+    },
+
+    // 保存图片
+    saveImage() {
+      let that = this
+      uni.canvasToTempFilePath({
+        x: 0,
+        y: 0,
+        width: 340,
+        height: 340,
+        canvasId: 'myCanvas',
+        success: function (res) {
+          uni.saveImageToPhotosAlbum({
+            filePath: res.tempFilePath,
+            success: function () {
+              that.$successToast('保存成功')
+            }
+          })
+        }
+      })
+    },
+
+    // 关闭canvas
+    closeCanvas() {
+      this.isShowCanvas = false
+      uni.hideLoading()
+    }
+  }
+}
 </script>
 
 <style lang="scss">
-	.app-container {
-		background: #F4F2F2;
-		box-sizing: border-box;
-		padding-top: 184rpx;
-	}
-	
-	.fixed-container {
-		position: fixed;
-		top: 0;
-		left: 0;
-		width: 100%;
-	}
-	
-	.share-container {
-		position: fixed;
-		right: 20rpx;
-		// bottom: 30vh;
-		button {
-			width: 108rpx;
-			height: 108rpx;
-			padding: 0;
-			display: flex;
-			flex-direction: column;
-			justify-content: center;
-			align-items: center;
-			border-radius: 50%;
-			// box-shadow: 0 1px 4px rgba(0, 21, 41, .8);
-			background: #ffffff;
-			border: 4rpx solid #eaeaea;
-			image {
-				width: 28rpx;
-				height: 28rpx;
-				display: block;
-				flex-shrink: 0;
-				margin-bottom: 6rpx;
-			}
-			text {
-				font-size: 22rpx;
-				line-height: 24rpx;
-				color: #666666;
-				margin-top: 8rpx;
-			}
-		}
-	}
-	
-	.top-container {
-		background: #FFFFFF;
-		.tab {
-			display: flex;
-			margin-left: -10rpx;
-			.item {
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				flex-shrink: 0;
-				font-size: 28rpx;
-				color: #666666;
-				height: 80rpx;
-				line-height: 80rpx;
-				position: relative;
-				padding: 0 30rpx;
-				&.current {
-					color: #FF3F42;
-					font-weight: 600;
-					&::after {
-						content: '';
-						display: block;
-						width: 50rpx;
-						height: 6rpx;
-						background: #FF3F42;
-						position: absolute;
-						bottom: 0;
-						left: 50%;
-						margin-left: -25rpx;
-					}
-				}
-			}
-		}
-	}
-	
-	.search-container {
-		background: #FFFFFF;
-		padding: 20rpx;
-		.search {
-			height: 64rpx;
-			display: flex;
-			align-items: center;
-			border-radius: 64rpx;
-			padding: 0 20rpx;
-			border: 1px solid #eaeaea;
-			image {
-				width: 28rpx;
-				height: 28rpx;
-			}
-			input {
-				width: 100%;
-				padding-left: 15rpx;
-			}
-		}
-	}
-	
-	.banner-container {
-		padding: 20rpx 20rpx 0;
-		image {
-			display: block;
-			width: 100%;
-			border-radius: 10rpx;
-		}
-	}
-	
-	.list-container {
-		padding: 20rpx;
-		.item {
-			background: #FFFFFF;
-			border-radius: 10rpx;
-			display: flex;
-			padding: 20rpx;
-			margin-bottom: 20rpx;
-			image {
-				display: block;
-				width: 180rpx;
-				height: 180rpx;
-				flex-shrink: 0;
-			}
-			.right {
-				width: 490rpx;
-				box-sizing: border-box;
-				padding-left: 20rpx;
-				.title {
-					font-size: 30rpx;
-					color: #333333;
-					line-height: 36rpx;
-					font-weight: 600;
-				}
-				.des {
-					font-size: 24rpx;
-					line-height: 30rpx;
-					color: #999999;
-					margin-top: 6rpx;
-				}
-				.stock-sales {
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					margin-top: 10rpx;
-					font-size: 24rpx;
-					color: #666666;
-					.stock {
-						display: flex;
-						align-items: center;
-						text {
-							font-size: 24rpx;
-							color: #666666;
-						}
-						.progress-box {
-							width: 140rpx;
-							border-radius: 6px;
-							overflow: hidden;
-							margin-left: 10rpx;
-						}
-					}
-				}
-				.bottom {
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					margin-top: 10rpx;
-					.price {
-						display: flex;
-						flex-direction: column;
-					}
-					.price-1 {
-						font-size: 32rpx;
-						color: #FF3F42;
-						line-height: 36rpx;
-					}
-					.price-2 {
-						font-size: 26rpx;
-						color: #666666;
-						line-height: 30rpx;
-						text-decoration: line-through;
-					}
-					.btn {
-						width: 110rpx;
-						height: 44rpx;
-						background: #FF3F42;
-						border-radius: 5rpx;
-						font-size: 28rpx;
-						color: #FFFFFF;
-						text-align: center;
-						line-height: 44rpx;
-					}
-					.btn2 {
-						width: 110rpx;
-						height: 44rpx;
-						background: #AAAAAA;
-						border-radius: 5rpx;
-						font-size: 28rpx;
-						color: #FFFFFF;
-						text-align: center;
-						line-height: 44rpx;
-					}
-				}
-			}
-		}
-	}
-	
-	.sharelist-container {
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		z-index: 999;
-		width: 100%;
-		box-sizing: border-box;
-		background: #FFFFFF;
-		padding: 30rpx 0;
-		display: flex;
-		button {
-			background: none;
-			border-radius:0;
-			&::after {
-				border: none;
-			}
-		}
-		.item {
-			display: flex;
-			width: 50%;
-			flex-direction: column;
-			align-items: center;
-			image {
-				width: 100rpx;
-				height: 100rpx;
-				display: block;
-				margin-bottom: 20rpx;
-			}
-			text {
-				font-size: 28rpx;
-				line-height: 32rpx;
-				color: #333333;
-			}
-		}
-	}
-	.canvas-container {
-		position: fixed;
-		left: 50%;
-		top: 50%;
-		z-index: 999;
-		margin-left: -170px;
-		margin-top: -170px;
-		.button {
-			display: flex;
-			justify-content: center;
-			text {
-				display: block;
-				width: 280rpx;
-				height: 70rpx;
-				border-radius: 70rpx;
-				background: linear-gradient(-90deg,#ff3f42 0%, #fe781f 100%);
-				font-size: 28rpx;
-				color: #FFFFFF;
-				text-align: center;
-				line-height: 70rpx;
-				margin-top: 20rpx;
-			}
-		}
-	}
+.app-container {
+  background: #f4f2f2;
+  box-sizing: border-box;
+  padding-top: 184rpx;
+}
+
+.fixed-container {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+}
+
+.share-container {
+  position: fixed;
+  right: 20rpx;
+  // bottom: 30vh;
+  button {
+    width: 108rpx;
+    height: 108rpx;
+    padding: 0;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    border-radius: 50%;
+    // box-shadow: 0 1px 4px rgba(0, 21, 41, .8);
+    background: #ffffff;
+    border: 4rpx solid #eaeaea;
+    image {
+      width: 28rpx;
+      height: 28rpx;
+      display: block;
+      flex-shrink: 0;
+      margin-bottom: 6rpx;
+    }
+    text {
+      font-size: 22rpx;
+      line-height: 24rpx;
+      color: #666666;
+      margin-top: 8rpx;
+    }
+  }
+}
+
+.top-container {
+  background: #ffffff;
+  .tab {
+    display: flex;
+    margin-left: -10rpx;
+    .item {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      flex-shrink: 0;
+      font-size: 28rpx;
+      color: #666666;
+      height: 80rpx;
+      line-height: 80rpx;
+      position: relative;
+      padding: 0 30rpx;
+      &.current {
+        color: #ff3f42;
+        font-weight: 600;
+        &::after {
+          content: '';
+          display: block;
+          width: 50rpx;
+          height: 6rpx;
+          background: #ff3f42;
+          position: absolute;
+          bottom: 0;
+          left: 50%;
+          margin-left: -25rpx;
+        }
+      }
+    }
+  }
+}
+
+.search-container {
+  background: #ffffff;
+  padding: 20rpx;
+  .search {
+    height: 64rpx;
+    display: flex;
+    align-items: center;
+    border-radius: 64rpx;
+    padding: 0 20rpx;
+    border: 1px solid #eaeaea;
+    image {
+      width: 28rpx;
+      height: 28rpx;
+    }
+    input {
+      width: 100%;
+      padding-left: 15rpx;
+    }
+  }
+}
+
+.banner-container {
+  padding: 20rpx 20rpx 0;
+  image {
+    display: block;
+    width: 100%;
+    border-radius: 10rpx;
+  }
+}
+
+.list-container {
+  padding: 20rpx;
+  .item {
+    background: #ffffff;
+    border-radius: 10rpx;
+    display: flex;
+    padding: 20rpx;
+    margin-bottom: 20rpx;
+    image {
+      display: block;
+      width: 180rpx;
+      height: 180rpx;
+      flex-shrink: 0;
+    }
+    .right {
+      width: 490rpx;
+      box-sizing: border-box;
+      padding-left: 20rpx;
+      .title {
+        font-size: 30rpx;
+        color: #333333;
+        line-height: 36rpx;
+        font-weight: 600;
+      }
+      .des {
+        font-size: 24rpx;
+        line-height: 30rpx;
+        color: #999999;
+        margin-top: 6rpx;
+      }
+      .stock-sales {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin-top: 10rpx;
+        font-size: 24rpx;
+        color: #666666;
+        .stock {
+          display: flex;
+          align-items: center;
+          text {
+            font-size: 24rpx;
+            color: #666666;
+          }
+          .progress-box {
+            width: 140rpx;
+            border-radius: 6px;
+            overflow: hidden;
+            margin-left: 10rpx;
+          }
+        }
+      }
+      .bottom {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin-top: 10rpx;
+        .price {
+          display: flex;
+          flex-direction: column;
+        }
+        .price-1 {
+          font-size: 32rpx;
+          color: #ff3f42;
+          line-height: 36rpx;
+        }
+        .price-2 {
+          font-size: 26rpx;
+          color: #666666;
+          line-height: 30rpx;
+          text-decoration: line-through;
+        }
+        .btn {
+          width: 110rpx;
+          height: 44rpx;
+          background: #ff3f42;
+          border-radius: 5rpx;
+          font-size: 28rpx;
+          color: #ffffff;
+          text-align: center;
+          line-height: 44rpx;
+        }
+        .btn2 {
+          width: 110rpx;
+          height: 44rpx;
+          background: #aaaaaa;
+          border-radius: 5rpx;
+          font-size: 28rpx;
+          color: #ffffff;
+          text-align: center;
+          line-height: 44rpx;
+        }
+      }
+    }
+  }
+}
+
+.sharelist-container {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  z-index: 999;
+  width: 100%;
+  box-sizing: border-box;
+  background: #ffffff;
+  padding: 30rpx 0;
+  display: flex;
+  button {
+    background: none;
+    border-radius: 0;
+    &::after {
+      border: none;
+    }
+  }
+  .item {
+    display: flex;
+    width: 50%;
+    flex-direction: column;
+    align-items: center;
+    image {
+      width: 100rpx;
+      height: 100rpx;
+      display: block;
+      margin-bottom: 20rpx;
+    }
+    text {
+      font-size: 28rpx;
+      line-height: 32rpx;
+      color: #333333;
+    }
+  }
+}
+.canvas-container {
+  position: fixed;
+  left: 50%;
+  top: 50%;
+  z-index: 999;
+  margin-left: -170px;
+  margin-top: -170px;
+  .button {
+    display: flex;
+    justify-content: center;
+    text {
+      display: block;
+      width: 280rpx;
+      height: 70rpx;
+      border-radius: 70rpx;
+      background: linear-gradient(-90deg, #ff3f42 0%, #fe781f 100%);
+      font-size: 28rpx;
+      color: #ffffff;
+      text-align: center;
+      line-height: 70rpx;
+      margin-top: 20rpx;
+    }
+  }
+}
 </style>

+ 411 - 404
src/packageWorkorder/pages/appraise.vue

@@ -1,436 +1,443 @@
 <template>
   <!-- #ifdef H5 -->
-	<zj-page-layout :hasFooter="true">
-		<view class="page-container">
-			<view class="card-container">
-				<view class="top">
-					<view class="title"><text>*</text>服务评价</view>
-					<u-rate count="5" :size="24" v-model="star"></u-rate>
-					<!-- <view class="text">非常好</view> -->
-				</view>
-				<u--textarea v-model="remarkVal" height="100" placeholder="根据本次服务,写出您的真实感受~" fixed border="none"></u--textarea>
-				<view class="images">
-					<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>
-						</view>
-					</block>
-					<view class="add"  @tap="addImage" v-if="imageList.length < 3">
-						<text class="iconfont icon-xiangji"></text>
-						<text class="text">添加图片</text>
-					</view>
-				</view>
-			</view>
+  <zj-page-layout :hasFooter="true">
+    <view class="page-container">
+      <view class="card-container">
+        <view class="top">
+          <view class="title"><text>*</text>服务评价</view>
+          <u-rate count="5" :size="24" v-model="star"></u-rate>
+          <!-- <view class="text">非常好</view> -->
+        </view>
+        <u--textarea
+          v-model="remarkVal"
+          height="100"
+          placeholder="根据本次服务,写出您的真实感受~"
+          fixed
+          border="none"
+        ></u--textarea>
+        <view class="images">
+          <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>
+            </view>
+          </block>
+          <view class="add" @tap="addImage" v-if="imageList.length < 3">
+            <text class="iconfont icon-xiangji"></text>
+            <text class="text">添加图片</text>
+          </view>
+        </view>
+      </view>
 
-			<view class="goods-container" v-if="!noData">
-				<view class="orderid">
-					<view class="row" v-if="detail.saleOrderNo">
-						<view class="ellipsis">订单号<text>{{detail.saleOrderNo}}</text></view>
-						<view class="copy" @tap.stop="copy(detail.saleOrderNo)">复制</view>
-					</view>
-					<view class="row">
-						<view class="ellipsis">工单号<text>{{id}}</text></view>
-						<view class="copy" @tap.stop="copy(id)">复制</view>
-					</view>
-				</view>
-				<view
-					class="goods"
-					:class="'goods'+idx"
-					v-for="(it, idx) in detail.products"
-					:key='idx'>
-					<image :src="imageUrl + it.mainImg" mode="aspectFill" v-if="it.mainImg"></image>
-					<image :src="configInfo.minLogo3" mode="aspectFill" v-else></image>
-					<view class="main">
-						<view class="name ellipsis-2">{{it.productName || ''}}</view>
-						<!-- <view class="des">{{it.small_name}}</view> -->
-						<view class="tags">
-							<view class="tag1">{{detail.orderTypeName}}</view>
-							<view class="tag2">{{detail.mainName}}</view>
-						</view>
-					</view>
-				</view>
-				<view class="info" v-show="isShowGoodsMore">
-					<view class="row" v-if="detail.appointmentTime">
-						<view class="label">预约时间</view>
-						<view class="value">{{detail.appointmentTime}}</view>
-					</view>
-					<view class="row" v-if="detail.workerName">
-						<view class="label">工程师</view>
-						<view class="value">{{detail.workerName}}</view>
-						<text class="iconfont icon-call" @tap="callPhone"></text><text class="call" @tap="callPhone">联系Ta</text>
-						<block v-if="locationData">
-							<text class="iconfont icon-dingwei1" @tap="toLocation"></text><text class="call" @tap="toLocation">查看位置</text>
-						</block>
-					</view>
-					<view class="row">
-						<view class="label">用户信息</view>
-						<view class="value">{{detail.userName || ''}}-{{detail.userMobile || ''}}</view>
-					</view>
-					<view class="row">
-						<view class="label">服务地址</view>
-						<view class="value">{{detail.province}}{{detail.city}}{{detail.area}}{{detail.street}}{{detail.address}}</view>
-					</view>
-					<view class="row">
-						<view class="label">备注</view>
-						<view class="value">{{detail.remark}}</view>
-					</view>
-				</view>
-				<view class="ctrl" @tap="isShowGoodsMore = !isShowGoodsMore">
-					<text class="iconfont icon-jinru" :class="isShowGoodsMore ? 'open':''"></text>
-					<text class="text">{{isShowGoodsMore ? '收起':'查看更多'}}</text>
-				</view>
-			</view>
-		</view>
+      <view class="goods-container" v-if="!noData">
+        <view class="orderid">
+          <view class="row" v-if="detail.saleOrderNo">
+            <view class="ellipsis"
+              >订单号<text>{{ detail.saleOrderNo }}</text></view
+            >
+            <view class="copy" @tap.stop="copy(detail.saleOrderNo)">复制</view>
+          </view>
+          <view class="row">
+            <view class="ellipsis"
+              >工单号<text>{{ id }}</text></view
+            >
+            <view class="copy" @tap.stop="copy(id)">复制</view>
+          </view>
+        </view>
+        <view class="goods" :class="'goods' + idx" v-for="(it, idx) in detail.products" :key="idx">
+          <image :src="imageUrl + it.mainImg" mode="aspectFill" v-if="it.mainImg"></image>
+          <image :src="configInfo.minLogo3" mode="aspectFill" v-else></image>
+          <view class="main">
+            <view class="name ellipsis-2">{{ it.productName || '' }}</view>
+            <!-- <view class="des">{{it.small_name}}</view> -->
+            <view class="tags">
+              <view class="tag1">{{ detail.orderTypeName }}</view>
+              <view class="tag2">{{ detail.mainName }}</view>
+            </view>
+          </view>
+        </view>
+        <view class="info" v-show="isShowGoodsMore">
+          <view class="row" v-if="detail.appointmentTime">
+            <view class="label">预约时间</view>
+            <view class="value">{{ detail.appointmentTime }}</view>
+          </view>
+          <view class="row" v-if="detail.workerName">
+            <view class="label">工程师</view>
+            <view class="value">{{ detail.workerName }}</view>
+            <text class="iconfont icon-call" @tap="callPhone"></text><text class="call" @tap="callPhone">联系Ta</text>
+            <block v-if="locationData">
+              <text class="iconfont icon-dingwei1" @tap="toLocation"></text
+              ><text class="call" @tap="toLocation">查看位置</text>
+            </block>
+          </view>
+          <view class="row">
+            <view class="label">用户信息</view>
+            <view class="value">{{ detail.userName || '' }}-{{ detail.userMobile || '' }}</view>
+          </view>
+          <view class="row">
+            <view class="label">服务地址</view>
+            <view class="value"
+              >{{ detail.province }}{{ detail.city }}{{ detail.area }}{{ detail.street }}{{ detail.address }}</view
+            >
+          </view>
+          <view class="row">
+            <view class="label">备注</view>
+            <view class="value">{{ detail.remark }}</view>
+          </view>
+        </view>
+        <view class="ctrl" @tap="isShowGoodsMore = !isShowGoodsMore">
+          <text class="iconfont icon-jinru" :class="isShowGoodsMore ? 'open' : ''"></text>
+          <text class="text">{{ isShowGoodsMore ? '收起' : '查看更多' }}</text>
+        </view>
+      </view>
+    </view>
 
-		<template slot="footer">
-			<view class="btn-group">
-				<u-button text="发布" type="primary" size="large" @click="submitData"></u-button>
-			</view>
-		</template>
-	</zj-page-layout>
+    <template slot="footer">
+      <view class="btn-group">
+        <u-button text="发布" type="primary" size="large" @click="submitData"></u-button>
+      </view>
+    </template>
+  </zj-page-layout>
   <!-- #endif -->
 
   <!-- #ifndef H5 -->
-  <web-view :src="webViewHref(`/packageWorkorder/pages/appraise`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
+  <web-view
+    :src="webViewHref(`/packageWorkorder/pages/appraise`, pam, crossPagePam)"
+    @message="crossPage.$listener"
+  ></web-view>
   <!-- #endif -->
 </template>
 
 <script>
-  // #ifdef H5
-	import { uploadImgFull } from '@/common/utils/util.js';
+ // #ifdef H5
+import { uploadImgFull } from '@/common/utils/util.js';
 
-	export default {
-		data() {
-			return {
-				configInfo: {},
-				imageUrl: this.$imageUrl,
-				id: null,
-				type: null,
-				star: 0,
-				remarkVal: '',
-				imageList: [],
-				isShowGoodsMore: false,
-				detail: {}, // 详情数据
-				noData: true,
-			}
-		},
+export default {
+	data() {
+		return {
+			configInfo: {},
+			imageUrl: this.$imageUrl,
+			id: null,
+			type: null,
+			star: 0,
+			remarkVal: '',
+			imageList: [],
+			isShowGoodsMore: false,
+			detail: {}, // 详情数据
+			noData: true,
+		}
+	},
 
-		async onLoad({id, type}) {
-			this.id = id;
-			this.type = type;
-			// this.getOrderDetail();
-      this.configInfo = await this.$getConfigInfo();
-		},
+	async onLoad({id, type}) {
+		this.id = id;
+		this.type = type;
+		// this.getOrderDetail();
+     this.configInfo = await this.$getConfigInfo();
+	},
 
-		methods: {
-			getOrderDetail() {
-				this.$axios({
-					url: '/order/customer/detail',
-					method: 'post',
-					server: 'pc',
-					params: {
-						userMobile: this.userInfo.mobile,
-						id: this.id,
-					},
-				}).then(res => {
-					if(res.data) {
-						this.noData = false;
-						this.detail = res.data;
-					}else {
-						this.noData = true;
-					}
-				})
-			},
+	methods: {
+		getOrderDetail() {
+			this.$api
+       .post('/order/customer/detail',{
+         userMobile: this.userInfo.mobile,
+         id: this.id,
+			}).then(res => {
+				if(res.data) {
+					this.noData = false;
+					this.detail = res.data;
+				}else {
+					this.noData = true;
+				}
+			})
+		},
 
-			// 添加图片
-			async addImage() {
-				uni.chooseImage({
-					count: 3 - this.imageList.length,
-					success: res => {
-						uni.showLoading();
-						res.tempFilePaths.forEach(async item => {
-							let data = await uploadImgFull(item);
-							this.imageList.push(data);
-						});
-						uni.hideLoading();
-					},
-					fail: err => {}
-				})
-			},
+		// 添加图片
+		async addImage() {
+			uni.chooseImage({
+				count: 3 - this.imageList.length,
+				success: res => {
+					uni.showLoading();
+					res.tempFilePaths.forEach(async item => {
+						let data = await uploadImgFull(item);
+						this.imageList.push(data);
+					});
+					uni.hideLoading();
+				},
+				fail: err => {}
+			})
+		},
 
 
-			callPhone() {
-				uni.makePhoneCall({
-				    phoneNumber: this.detail.workerMobile
-				});
-			},
+		callPhone() {
+			uni.makePhoneCall({
+			    phoneNumber: this.detail.workerMobile
+			});
+		},
 
-			// 删除图片
-			delImage(index) {
-				this.imageList.splice(index, 1);
-			},
+		// 删除图片
+		delImage(index) {
+			this.imageList.splice(index, 1);
+		},
 
-			//预览图片
-			prevImg(current) {
-				uni.previewImage({
-					current,
-					urls: this.imageList.map(item => {
-						return item.url
-					})
+		//预览图片
+		prevImg(current) {
+			uni.previewImage({
+				current,
+				urls: this.imageList.map(item => {
+					return item.url
 				})
-			},
-
-			submitData() {
-				if(!this.star) return this.$toast('请选择服务评价');
+			})
+		},
 
-				this.$api.postJson('/pg/order/base/appraise', {
-          orderBaseId: this.id,
-          level: this.star,
-          appraiseContent: this.remarkVal,
-          appraiseImgUrl: this.imageList.map(item => {
-            return item.url
-          }).join(','),
-				}).then(res => {
-					this.$successToast('评价成功');
-					this.crossPage.$emit('refreshUserWorkorderList', '');
-					this.$navToPage({
-						delta: 1
-					}, 'navigateBack')
-				})
-			}
+		submitData() {
+			if(!this.star) return this.$toast('请选择服务评价');
 
+			this.$api.postJson('/pg/order/base/appraise', {
+         orderBaseId: this.id,
+         level: this.star,
+         appraiseContent: this.remarkVal,
+         appraiseImgUrl: this.imageList.map(item => {
+           return item.url
+         }).join(','),
+			}).then(res => {
+				this.$successToast('评价成功');
+				this.crossPage.$emit('refreshUserWorkorderList', '');
+				this.$navToPage({
+					delta: 1
+				}, 'navigateBack')
+			})
 		}
+
 	}
+}
 
-  // #endif
-  // #ifndef H5
-  export default {
-    data() {
-      return {
-        pam: {},
-      }
-    },
-    onLoad(pam) {
-      this.pam = pam;
-    }
-  }
-  // #endif
+ // #endif
+ // #ifndef H5
+ export default {
+   data() {
+     return {
+       pam: {},
+     }
+   },
+   onLoad(pam) {
+     this.pam = pam;
+   }
+ }
+ // #endif
 </script>
 
 <style lang="scss" scoped>
-	.page-container {
-		padding: 30rpx;
-	}
-
-	.card-container {
-		@include zj-card;
-		padding: 0 30rpx 30rpx;
-		.top {
-			height: 100rpx;
-			display: flex;
-			align-items: center;
-			.title {
-				font-size: 32rpx;
-				margin-right: 12rpx;
-				text {
-					color: $minor-color;
-				}
-			}
-			.text {
-				color: $sec-font;
-				margin-left: 8rpx;
-			}
-		}
-		::v-deep .u-textarea {
-			padding: 0;
-		}
-		.images {
-			display: flex;
-			flex-wrap: wrap;
-			margin-top: 20rpx;
-			.add {
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				justify-content: center;
-				width: 146rpx;
-				height: 146rpx;
-				border: 2rpx dashed #dadada;
-				border-radius: 10rpx;
-				margin-top: 20rpx;
-				.iconfont {
-					font-size: 48rpx;
-					color: #999999;
-				}
-				.text {
-					font-size: 24rpx;
-					color: #999999;
-					margin-top: 10rpx;
-				}
-			}
-			.img {
-				position: relative;
-				margin-right: 20rpx;
-				margin-top: 20rpx;
-				&:nth-child(4n) {
-					margin-right: 0;
-				}
-				image {
-					width: 150rpx;
-					height: 150rpx;
-					border-radius: 10rpx;
-					overflow: hidden;
-					display: block;
-				}
-				text {
-					position: absolute;
-					right: -10rpx;
-					top: -10rpx;
-					width: 40rpx;
-					height: 40rpx;
-					border-radius: 50%;
-					background: #FF3F42;
-					font-size: 24rpx;
-					color: #FFFFFF;
-					text-align: center;
-					line-height: 40rpx;
-					display: block;
-				}
-			}
-		}
-	}
+.page-container {
+  padding: 30rpx;
+}
 
-	.goods-container {
-		@include zj-card;
-		margin-top: 30rpx;
-		padding: 30rpx;
-		.orderid {
-			.row {
-				margin-bottom: 20rpx;
-				display: flex;
-				align-items: center;
-				view {
-					color: $sec-font;
-					text {
-						margin-left: 20rpx;
-						color: $main-font;
-						font-weight: 500;
-					}
-				}
-				.copy {
-					flex-shrink: 0;
-					margin-left: 10rpx;
-					font-size: 28rpx;
-					color: $theme-color;
-				}
-			}
-		}
-		.goods {
-			display: flex;
-			justify-content: space-between;
-			margin-top: 20rpx;
-			image {
-				width: 140rpx;
-				height: 140rpx;
-				display: block;
-				flex-shrink: 0;
-				margin-right: 20rpx;
-			}
-			.main {
-				flex: 1;
-				display: flex;
-				flex-direction: column;
-				.name {
-					font-size: 28rpx;
-					color: #333333;
-					line-height: 36rpx;
-				}
-				.des {
-					font-size: 28rpx;
-					color: #999999;
-					margin-top: 16rpx;
-				}
-				.tags {
-					margin-top: 16rpx;
-					display: flex;
-					.tag1 {
-						font-size: 24rpx;
-						height: 42rpx;
-						line-height: 42rpx;
-						padding: 0 16rpx;
-						margin-right: 10rpx;
-						border: 1px solid $minor-color;
-						color: $minor-color;
-						box-sizing: border-box;
-						display: flex;
-						align-items: center;
-						flex-direction: row;
-						border-radius: 10rpx;
-					}
-					.tag2 {
-						height: 42rpx;
-						padding: 0 16rpx;
-						line-height: 42rpx;
-						border-radius: 10rpx;
-						background: #e8e8e8;
-						font-size: 24rpx;
-						color: #666666;
-					}
-				}
-			}
-		}
-		.info {
-			margin-top: 20rpx;
-			.row {
-				font-size: 28rpx;
-				color: #666666;
-				margin-bottom: 20rpx;
-				display: flex;
-				.label {
-					color: $sec-font;
-					flex-shrink: 0;
-					width: 128rpx;
-				}
-				.value {
+.card-container {
+  @include zj-card;
+  padding: 0 30rpx 30rpx;
+  .top {
+    height: 100rpx;
+    display: flex;
+    align-items: center;
+    .title {
+      font-size: 32rpx;
+      margin-right: 12rpx;
+      text {
+        color: $minor-color;
+      }
+    }
+    .text {
+      color: $sec-font;
+      margin-left: 8rpx;
+    }
+  }
+  ::v-deep .u-textarea {
+    padding: 0;
+  }
+  .images {
+    display: flex;
+    flex-wrap: wrap;
+    margin-top: 20rpx;
+    .add {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 146rpx;
+      height: 146rpx;
+      border: 2rpx dashed #dadada;
+      border-radius: 10rpx;
+      margin-top: 20rpx;
+      .iconfont {
+        font-size: 48rpx;
+        color: #999999;
+      }
+      .text {
+        font-size: 24rpx;
+        color: #999999;
+        margin-top: 10rpx;
+      }
+    }
+    .img {
+      position: relative;
+      margin-right: 20rpx;
+      margin-top: 20rpx;
+      &:nth-child(4n) {
+        margin-right: 0;
+      }
+      image {
+        width: 150rpx;
+        height: 150rpx;
+        border-radius: 10rpx;
+        overflow: hidden;
+        display: block;
+      }
+      text {
+        position: absolute;
+        right: -10rpx;
+        top: -10rpx;
+        width: 40rpx;
+        height: 40rpx;
+        border-radius: 50%;
+        background: #ff3f42;
+        font-size: 24rpx;
+        color: #ffffff;
+        text-align: center;
+        line-height: 40rpx;
+        display: block;
+      }
+    }
+  }
+}
 
-				}
-				.iconfont {
-					margin-left: 16rpx;
-				}
-				text {
-					color: $theme-color;
-				}
-			}
-		}
-		.ctrl {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			color: $sec-font;
-			margin-top: 30rpx;
-			.iconfont {
-				margin-right: 10rpx;
-				transform: rotate(90deg);
-				&.open {
-					transform: rotate(270deg);
-				}
-			}
-		}
-	}
+.goods-container {
+  @include zj-card;
+  margin-top: 30rpx;
+  padding: 30rpx;
+  .orderid {
+    .row {
+      margin-bottom: 20rpx;
+      display: flex;
+      align-items: center;
+      view {
+        color: $sec-font;
+        text {
+          margin-left: 20rpx;
+          color: $main-font;
+          font-weight: 500;
+        }
+      }
+      .copy {
+        flex-shrink: 0;
+        margin-left: 10rpx;
+        font-size: 28rpx;
+        color: $theme-color;
+      }
+    }
+  }
+  .goods {
+    display: flex;
+    justify-content: space-between;
+    margin-top: 20rpx;
+    image {
+      width: 140rpx;
+      height: 140rpx;
+      display: block;
+      flex-shrink: 0;
+      margin-right: 20rpx;
+    }
+    .main {
+      flex: 1;
+      display: flex;
+      flex-direction: column;
+      .name {
+        font-size: 28rpx;
+        color: #333333;
+        line-height: 36rpx;
+      }
+      .des {
+        font-size: 28rpx;
+        color: #999999;
+        margin-top: 16rpx;
+      }
+      .tags {
+        margin-top: 16rpx;
+        display: flex;
+        .tag1 {
+          font-size: 24rpx;
+          height: 42rpx;
+          line-height: 42rpx;
+          padding: 0 16rpx;
+          margin-right: 10rpx;
+          border: 1px solid $minor-color;
+          color: $minor-color;
+          box-sizing: border-box;
+          display: flex;
+          align-items: center;
+          flex-direction: row;
+          border-radius: 10rpx;
+        }
+        .tag2 {
+          height: 42rpx;
+          padding: 0 16rpx;
+          line-height: 42rpx;
+          border-radius: 10rpx;
+          background: #e8e8e8;
+          font-size: 24rpx;
+          color: #666666;
+        }
+      }
+    }
+  }
+  .info {
+    margin-top: 20rpx;
+    .row {
+      font-size: 28rpx;
+      color: #666666;
+      margin-bottom: 20rpx;
+      display: flex;
+      .label {
+        color: $sec-font;
+        flex-shrink: 0;
+        width: 128rpx;
+      }
+      .value {
+      }
+      .iconfont {
+        margin-left: 16rpx;
+      }
+      text {
+        color: $theme-color;
+      }
+    }
+  }
+  .ctrl {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    color: $sec-font;
+    margin-top: 30rpx;
+    .iconfont {
+      margin-right: 10rpx;
+      transform: rotate(90deg);
+      &.open {
+        transform: rotate(270deg);
+      }
+    }
+  }
+}
 
-	.btn-group {
-		padding: 25rpx 30rpx;
-		display: flex;
-		align-items: center;
-		::v-deep .u-button {
-			height: 88rpx;
-			font-size: 32rpx;
-			margin-right: 30rpx;
-			border-radius: 88rpx;
-			&:last-child {
-				margin-right: 0;
-			}
-		}
-	}
+.btn-group {
+  padding: 25rpx 30rpx;
+  display: flex;
+  align-items: center;
+  ::v-deep .u-button {
+    height: 88rpx;
+    font-size: 32rpx;
+    margin-right: 30rpx;
+    border-radius: 88rpx;
+    &:last-child {
+      margin-right: 0;
+    }
+  }
+}
 </style>

+ 149 - 0
src/pages.json

@@ -74,6 +74,155 @@
 
   "subpackages": [
     {
+      "root": "packageAttachment",
+      "name": "packageAttachment",
+      "pages": [
+        {
+          "path": "pages/fittingsManagement/index",
+          "style": {
+            "navigationBarTitleText": "配件管理",
+            "enablePullDownRefresh": false,
+            "navigationBarTextStyle": "white",
+            "navigationBarBackgroundColor": "#6DA7FF"
+          }
+        },
+        {
+          "path": "pages/sparePartsInventory/choosingAccessories",
+          "style": {
+            "navigationBarTitleText": "添加配件",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/applicationParts/confirmOrder",
+          "style": {
+            "navigationBarTitleText": "确认订单",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/orderOfSales/index",
+          "style": {
+            "navigationBarTitleText": "配件申请",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/applicationParts/applicationPartsForm",
+          "style": {
+            "navigationBarTitleText": "购买配件",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/applicationParts/state",
+          "style": {
+            "navigationBarTitleText": "支付订单",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/sparePartsInventory/index",
+          "style": {
+            "navigationBarTitleText": "配件库存",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/forwardSaleOrder/index",
+          "style": {
+            "navigationBarTitleText": "转销售单",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/applicationParts/index",
+          "style": {
+            "navigationStyle": "custom",
+            "disableScroll": true
+          }
+        },
+        {
+          "path": "pages/beyondInsuranceTransferToSale/index",
+          "style": {
+            "navigationBarTitleText": "保外转销售单",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/forwardSaleOrder/details",
+          "style": {
+            "navigationBarTitleText": "详情",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/applyReturnOfNewPiece/index",
+          "style": {
+            "navigationBarTitleText": "申请新件返还",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/orderOfSales/details",
+          "style": {
+            "navigationBarTitleText": "配件申请",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/applicationParts/orderPayment",
+          "style": {
+            "navigationBarTitleText": "支付订单",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/returnOfNewParts/details",
+          "style": {
+            "navigationBarTitleText": "详情",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/returnOfOldParts/details",
+          "style": {
+            "navigationBarTitleText": "详情",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/returnOfOldParts/workOrderView",
+          "style": {
+            "navigationBarTitleText": "工单查看",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/returnOfOldParts/index",
+
+          "style": {
+            "navigationBarTitleText": "旧件返还",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/returnOfNewParts/index",
+          "style": {
+            "navigationBarTitleText": "新件返还",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "pages/applyReturnOfNewPiece/state",
+          "style": {
+            "navigationBarTitleText": "申请新件返还状态",
+            "enablePullDownRefresh": false
+          }
+        }
+      ]
+    },
+    {
       "root": "packageHome",
       "name": "packageHome",
       "pages": [

+ 280 - 281
src/pages/login/index.vue

@@ -1,312 +1,311 @@
 <template>
-	<view class="app-container">
-		<view class="main-container">
-			<view class="header">
-				<image :src="configInfo.minLogo1"></image>
-				<view>{{configInfo.minAppName}}</view>
-			</view>
-			<view class="bottom">
-				<view class="content">
-					<view>申请获取以下权限</view>
-					<text>获取你的公开信息(昵称,头像、地区等)</text>
-				</view>
-				<button class="button" type="primary" @tap="wxLogin">授权登录</button>
-				<!-- <view class="tips">登录即代表同意<text @tap="toAgreement(1)">《用户协议》</text>和<text @tap="toAgreement(2)">《隐私声明》</text></view> -->
-			</view>
-		</view>
+  <view class="app-container">
+    <view class="main-container">
+      <view class="header">
+        <image :src="configInfo.minLogo1"></image>
+        <view>{{ configInfo.minAppName }}</view>
+      </view>
+      <view class="bottom">
+        <view class="content">
+          <view>申请获取以下权限</view>
+          <text>获取你的公开信息(昵称,头像、地区等)</text>
+        </view>
+        <button class="button" type="primary" @tap="wxLogin">授权登录</button>
+        <!-- <view class="tips">登录即代表同意<text @tap="toAgreement(1)">《用户协议》</text>和<text @tap="toAgreement(2)">《隐私声明》</text></view> -->
+      </view>
+    </view>
 
-		<u-popup :round="10" :show="isShowPhoneDialog">
-			<view class="phone-dialog">
-				<view class="content">
-					<view>申请获取以下权限</view>
-					<text>获得你的公开信息(手机号码)</text>
-				</view>
-				<view class="btn">
-					<button @tap="isShowPhoneDialog = false">取消</button>
-					<button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">确定授权</button>
-				</view>
-			</view>
-		</u-popup>
-	</view>
+    <u-popup :round="10" :show="isShowPhoneDialog">
+      <view class="phone-dialog">
+        <view class="content">
+          <view>申请获取以下权限</view>
+          <text>获得你的公开信息(手机号码)</text>
+        </view>
+        <view class="btn">
+          <button @tap="isShowPhoneDialog = false">取消</button>
+          <button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">确定授权</button>
+        </view>
+      </view>
+    </u-popup>
+  </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				configInfo: {},
-				userId: null,
-				isNotOpenid: false, // 是否因为 支付前没有openid 进入的登录页
+export default {
+  data() {
+    return {
+      configInfo: {},
+      userId: null,
+      isNotOpenid: false, // 是否因为 支付前没有openid 进入的登录页
 
-				isShowPhoneDialog: false, // 是否显示获取手机号授权弹窗
-			}
-		},
-		async onLoad({isNotOpenid}) {
-			this.isNotOpenid = isNotOpenid ? true : false;
-      this.configInfo = await this.$getConfigInfo();
+      isShowPhoneDialog: false // 是否显示获取手机号授权弹窗
+    }
+  },
+  async onLoad({ isNotOpenid }) {
+    this.isNotOpenid = isNotOpenid ? true : false
+    this.configInfo = await this.$getConfigInfo()
 
-			if(this.$getStorage('is_qywx') !== true && this.$getStorage('is_qywx') !== false) {
-				console.log('重新获取系统信息');
-				uni.getSystemInfo({
-					success: function(e) {
-						console.log(e);
-						if(e.environment == 'wxwork') {
-							this.$setStorage('is_qywx', true);
-						}else {
-							this.$setStorage('is_qywx', false);
-						}
-					}
-				})
-			}
-		},
-		methods: {
-			wxLogin() {
-				console.log('是否从企业微信端进入:'+this.$getStorage('is_qywx'));
-				// 没有openid
-				if(this.isNotOpenid == true) {
-					console.log('没有openid');
+    if (this.$getStorage('is_qywx') !== true && this.$getStorage('is_qywx') !== false) {
+      console.log('重新获取系统信息')
+      uni.getSystemInfo({
+        success: function (e) {
+          console.log(e)
+          if (e.environment == 'wxwork') {
+            this.$setStorage('is_qywx', true)
+          } else {
+            this.$setStorage('is_qywx', false)
+          }
+        }
+      })
+    }
+  },
+  methods: {
+    wxLogin() {
+      console.log('是否从企业微信端进入:' + this.$getStorage('is_qywx'))
+      // 没有openid
+      if (this.isNotOpenid == true) {
+        console.log('没有openid')
 
-					wx.login({
-						provider: 'weixin',
-						success: (loginRes) => {
-							console.log(loginRes);
-							this.$axios({
-								url: '/user/auth',
-								params: {
-									code: loginRes.code,
-									work: this.$getStorage('is_qywx'),
-									serviceId: this.$getStorage('is_qywx') ? this.$store.state.userId : '',
-								}
-							}).then(res => {
-								this.userId = res.data.userId;
-								this.mobile = res.data.mobile;
-								this.$setStorage('token', res.data.token);
+        wx.login({
+          provider: 'weixin',
+          success: loginRes => {
+            console.log(loginRes)
+            this.$axios({
+              url: '/user/auth',
+              params: {
+                code: loginRes.code,
+                work: this.$getStorage('is_qywx'),
+                serviceId: this.$getStorage('is_qywx') ? this.$store.state.userId : ''
+              }
+            }).then(res => {
+              this.userId = res.data.userId
+              this.mobile = res.data.mobile
+              this.$setStorage('token', res.data.token)
 
-								if(!this.mobile) {
-									return this.isShowPhoneDialog = true;
-								}
+              if (!this.mobile) {
+                return (this.isShowPhoneDialog = true)
+              }
 
-								this.loginSuccess();
-							})
-						}
-					});
-				}
+              this.loginSuccess()
+            })
+          }
+        })
+      }
 
-				// 企业微信端
-				else if(this.$getStorage('is_qywx') == true) {
-					console.log('从企业微信端进入');
-					wx.qy.login({
-						success: (loginRes) => {
-							console.log(loginRes);
-					        if (loginRes.code) {
-								this.$axios({
-									url: '/user/auth',
-									params: {
-										code: loginRes.code,
-										work: true,
-									}
-								}).then(res => {
-									this.userId = res.data.userId;
-									this.mobile = res.data.mobile;
-									this.$setStorage('token', res.data.token);
+      // 企业微信端
+      else if (this.$getStorage('is_qywx') == true) {
+        console.log('从企业微信端进入')
+        wx.qy.login({
+          success: loginRes => {
+            console.log(loginRes)
+            if (loginRes.code) {
+              this.$axios({
+                url: '/user/auth',
+                params: {
+                  code: loginRes.code,
+                  work: true
+                }
+              }).then(res => {
+                this.userId = res.data.userId
+                this.mobile = res.data.mobile
+                this.$setStorage('token', res.data.token)
 
-									if(!this.mobile || this.$getStorage('isActiveLogout')) {
-										return this.isShowPhoneDialog = true;
-									}
+                if (!this.mobile || this.$getStorage('isActiveLogout')) {
+                  return (this.isShowPhoneDialog = true)
+                }
 
-									this.loginSuccess();
-								})
-					        } else {
-								console.log('登录失败!' + loginRes.errMsg)
-					        }
-					    }
-					});
-				}
+                this.loginSuccess()
+              })
+            } else {
+              console.log('登录失败!' + loginRes.errMsg)
+            }
+          }
+        })
+      }
 
-				// 微信端
-				else if(this.$getStorage('is_qywx') == false) {
-					console.log('从微信端进入');
-					wx.login({
-						provider: 'weixin',
-						success: (loginRes) => {
-							console.log(loginRes);
-							this.$axios({
-								url: '/user/auth',
-								params: {
-									code: loginRes.code,
-									work: false
-								}
-							}).then(res => {
-								this.userId = res.data.userId;
-								this.mobile = res.data.mobile;
-								this.$setStorage('token', res.data.token);
+      // 微信端
+      else if (this.$getStorage('is_qywx') == false) {
+        console.log('从微信端进入')
+        wx.login({
+          provider: 'weixin',
+          success: loginRes => {
+            console.log(loginRes)
+            this.$axios({
+              url: '/user/auth',
+              params: {
+                code: loginRes.code,
+                work: false
+              }
+            }).then(res => {
+              this.userId = res.data.userId
+              this.mobile = res.data.mobile
+              this.$setStorage('token', res.data.token)
 
-								if(!this.mobile || this.$getStorage('isActiveLogout')) {
-									return this.isShowPhoneDialog = true;
-								}
+              if (!this.mobile || this.$getStorage('isActiveLogout')) {
+                return (this.isShowPhoneDialog = true)
+              }
 
-								this.loginSuccess();
-							})
-						}
-					});
-				}
-				return false
-			},
+              this.loginSuccess()
+            })
+          }
+        })
+      }
+      return false
+    },
 
-			// 获取配置信息
-			async getConfigInfo () {
-				return new Promise((resolve, reject) => {
-					this.$axios({
-						url: '/common/config/get',
-						method: 'get',
-					}).then(res => {
-						resolve(res.data);
-					})
-				})
-			},
+    // 获取配置信息
+    async getConfigInfo() {
+      return new Promise((resolve, reject) => {
+        this.$axios({
+          url: '/common/config/get',
+          method: 'get'
+        }).then(res => {
+          resolve(res.data)
+        })
+      })
+    },
 
-			// 保存用户信息
-			async saveUserInfo(userInfo) {
-				const configInfo = await this.getConfigInfo();
+    // 保存用户信息
+    async saveUserInfo(userInfo) {
+      const configInfo = await this.getConfigInfo()
 
-				return new Promise((resolve, reject) => {
-					this.$axios({
-						url: '/user/userinfo/save',
-						params: {
-							userId: this.userId,
-							avatarUrl: configInfo.minLogo3,
-							nickName: `微信用户_${userInfo.mobile.slice(7, 11)}`,
-						},
-					}).then(res => {
-						resolve(res.data);
-					})
-				})
-			},
+      return new Promise((resolve, reject) => {
+        this.$axios({
+          url: '/user/userinfo/save',
+          params: {
+            userId: this.userId,
+            avatarUrl: configInfo.minLogo3,
+            nickName: `微信用户_${userInfo.mobile.slice(7, 11)}`
+          }
+        }).then(res => {
+          resolve(res.data)
+        })
+      })
+    },
 
-			// 获取手机号
-			getPhoneNumber(e) {
-				this.$axios({
-					url: '/user/mobile/grant',
-					params: {
-						userId: this.userId,
-						iv: e.detail.iv,
-						encryptedData: e.detail.encryptedData,
-					}
-				}).then(res => {
-					this.$setStorage('token', res.data.token);
-					this.$setStorage('isActiveLogout', false);
-					this.isShowPhoneDialog = false;
+    // 获取手机号
+    getPhoneNumber(e) {
+      this.$axios({
+        url: '/user/mobile/grant',
+        params: {
+          userId: this.userId,
+          iv: e.detail.iv,
+          encryptedData: e.detail.encryptedData
+        }
+      }).then(res => {
+        this.$setStorage('token', res.data.token)
+        this.$setStorage('isActiveLogout', false)
+        this.isShowPhoneDialog = false
 
-					this.loginSuccess();
-				})
-			},
+        this.loginSuccess()
+      })
+    },
 
-			// 登录成功
-			async loginSuccess() {
-				const userInfo = await this.$getUserInfo(this.userId);
+    // 登录成功
+    async loginSuccess() {
+      const userInfo = await this.$getUserInfo(this.userId)
 
-				if(!userInfo.avatar || !userInfo.nickName) {
-					await this.saveUserInfo(userInfo);
-				}
+      if (!userInfo.avatar || !userInfo.nickName) {
+        await this.saveUserInfo(userInfo)
+      }
 
-				this.$store.commit('changeIsLogin', true);
-				this.$setStorage('isLogin', true);
-				this.$successToast('登录成功');
-				this.$isResolve();
-				this.$backPage(1, 1000);
-			},
+      this.$store.commit('changeIsLogin', true)
+      this.$setStorage('isLogin', true)
+      this.$successToast('登录成功')
+      this.$isResolve()
+      this.$backPage(1, 1000)
+    },
 
-			toAgreement(type) {
-				uni.navigateTo({
-					url:'/pages/login/agreement?type=' + type
-				})
-			}
-		}
-	}
+    toAgreement(type) {
+      uni.navigateTo({
+        url: '/pages/login/agreement?type=' + type
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss">
-	.app-container {
-		background: #FFFFFF;
-		box-sizing: border-box;
-	}
-	.main-container {
-		.header {
-			border-bottom: 1px solid #ccc;
-			text-align: center;
-			height: 400rpx;
-			margin-bottom: 50rpx;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			justify-content: center;
-			view {
-				font-size: 38rpx;
-				margin-top: 30rpx;
-			}
-			image {
-				width: 200rpx;
-				height: 200rpx;
-			}
-		}
+.app-container {
+  background: #ffffff;
+  box-sizing: border-box;
+}
+.main-container {
+  .header {
+    border-bottom: 1px solid #ccc;
+    text-align: center;
+    height: 400rpx;
+    margin-bottom: 50rpx;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    view {
+      font-size: 38rpx;
+      margin-top: 30rpx;
+    }
+    image {
+      width: 200rpx;
+      height: 200rpx;
+    }
+  }
 
-		.bottom {
-			padding: 0 50rpx;
-			.content {
-				font-size: 28rpx;
-				margin-bottom: 90rpx;
-				text {
-					display: block;
-					color: #9d9d9d;
-					margin-top: 30rpx;
-				}
-			}
-			.button {
-				border-radius: 80rpx;
-				margin: 70rpx 0 30rpx;
-				font-size: 35rpx;
-			}
-			.tips {
-				font-size: 26rpx;
-				color: #666666;
-				text {
-					color: #FF3F42;
-				}
-			}
-		}
-	}
-
-	.phone-dialog {
-		padding: 40rpx;
-		box-sizing: border-box;
-		.content {
-			margin-top: 30rpx;
-			margin-bottom: 30rpx;
-			line-height: 50rpx;
-			text {
-				color: #9d9d9d;
-			}
-		}
-		.btn {
-			display: flex;
-			justify-content: center;
-			margin-top: 60rpx;
-			button::after {
-				border: none;
-			}
-			button {
-				width: 180rpx;
-				height: 70rpx;
-				line-height: 70rpx;
-				margin: 0;
-				font-size: 28rpx;
-				margin: 0 30rpx;
-				&:first-child {
-					background: #f5f5f5;
-					color: #00ba5c;
-				}
-			}
-		}
-	}
+  .bottom {
+    padding: 0 50rpx;
+    .content {
+      font-size: 28rpx;
+      margin-bottom: 90rpx;
+      text {
+        display: block;
+        color: #9d9d9d;
+        margin-top: 30rpx;
+      }
+    }
+    .button {
+      border-radius: 80rpx;
+      margin: 70rpx 0 30rpx;
+      font-size: 35rpx;
+    }
+    .tips {
+      font-size: 26rpx;
+      color: #666666;
+      text {
+        color: #ff3f42;
+      }
+    }
+  }
+}
 
+.phone-dialog {
+  padding: 40rpx;
+  box-sizing: border-box;
+  .content {
+    margin-top: 30rpx;
+    margin-bottom: 30rpx;
+    line-height: 50rpx;
+    text {
+      color: #9d9d9d;
+    }
+  }
+  .btn {
+    display: flex;
+    justify-content: center;
+    margin-top: 60rpx;
+    button::after {
+      border: none;
+    }
+    button {
+      width: 180rpx;
+      height: 70rpx;
+      line-height: 70rpx;
+      margin: 0;
+      font-size: 28rpx;
+      margin: 0 30rpx;
+      &:first-child {
+        background: #f5f5f5;
+        color: #00ba5c;
+      }
+    }
+  }
+}
 </style>

+ 6 - 0
src/pages/mine/index.vue

@@ -350,6 +350,12 @@ export default {
           icon: 'icon-kehu',
           link: '/packageMine/pages/wodeanwei',
           show: this.isWorkerUser
+        },
+        {
+          name: '配件管理',
+          icon: 'icon-kehu',
+          link: '/packageAttachment/pages/fittingsManagement/index',
+          show: true
         }
       ]
     },

BIN
src/static/images/fittingsManagement/icon_cg.png


BIN
src/static/images/fittingsManagement/icon_next.png


BIN
src/static/images/fittingsManagement/jiajia.png


BIN
src/static/images/fittingsManagement/jianjian.png


BIN
src/static/images/fittingsManagement/module_0.png


BIN
src/static/images/fittingsManagement/module_1.png


BIN
src/static/images/fittingsManagement/module_2.png


BIN
src/static/images/fittingsManagement/module_3.png


BIN
src/static/images/fittingsManagement/module_4.png


BIN
src/static/images/map_back.png


BIN
src/static/images/order_call.png


+ 161 - 0
src/static/style/accessories_nfo_card.scss

@@ -0,0 +1,161 @@
+.accessories_nfo_card_view{
+	box-sizing: border-box;
+	padding: 30upx;
+}
+.accessories_nfo_card {
+	width: 100%;
+	height: auto;
+	box-sizing: border-box;
+	padding: 30upx;
+	background: #ffffff;
+	border-radius: 20upx;
+	font-size: 14px;
+	font-family: PingFang SC, PingFang SC-Medium;
+	font-weight: 500;
+
+		&:not(:last-child) {
+		margin-bottom: 30upx;
+	}
+	
+	.accessories_list_card {
+		background: #f7f7f7;
+		border-radius: 20upx;
+		width: 100%;
+		box-sizing: border-box;
+		padding: 38upx 30upx;
+		margin-bottom: 20upx;
+		.accessories_list_a{
+			width: 100%;
+			height: auto;
+			padding-bottom: 20upx;
+			margin-bottom: 20upx;
+			border-bottom: 1upx solid #e5e5e5;
+			.accessories_list_a_info{
+				width: 100%;
+				display: flex;
+				justify-content: space-between;
+				font-size: 14px;
+				font-family: PingFang SC, PingFang SC-Medium;
+				font-weight: 500;
+				text-align: left;
+				color: #333333;
+				view:nth-child(1){
+					width: 100%;
+					box-sizing: border-box;
+					padding-right: 10upx;
+				}
+				view:nth-child(2){
+					width: 66upx;
+					min-width: 66upx;
+				}
+				view:nth-child(3){
+					text-align: right;
+					width: 140upx;
+					min-width: 140upx;
+				}
+			}
+			.accessories_list_a_number{
+				font-size: 28upx;
+				font-family: PingFang SC, PingFang SC-Medium;
+				font-weight: 500;
+				text-align: left;
+				color: #666666;
+				margin-top: 8upx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				.viewtkstate{
+					font-size: 24upx;
+					color: #ffffff;
+					width: auto;
+					height: auto;
+					box-sizing: border-box;
+					padding:10upx 20upx;
+					border-radius: 30upx;
+					background: #79a8f8;
+				}
+			}
+		}
+		.accessories_list_a_ts:last-child{
+			padding-bottom: 0upx !important;
+			margin-bottom: 0upx !important;
+			border-bottom: none !important;
+		}
+		.accessories_list_amount{
+			text-align: right;
+			font-size: 32upx;
+			font-family: PingFang SC, PingFang SC-Medium;
+			font-weight: 500;
+			text-align: right;
+			color: #666666;
+		}
+	}
+	
+	.accessories_nfo_card_title {
+		width: 100%;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		font-size: 32upx;
+		font-family: PingFang SC, PingFang SC-Heavy;
+		font-weight: 800;
+		text-align: left;
+		color: #333333;
+		margin-bottom: 30upx;
+	}
+	
+	.accessories_nfo_card_text:not(:last-child) {
+		width: 100%;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		font-size: 28upx;
+		font-family: PingFang SC, PingFang SC-Medium;
+		font-weight: 500;
+		text-align: left;
+		color: #333333;
+		margin-bottom: 30upx;
+	}
+	
+	.accessories_nfo_card_note {
+		font-size: 28upx;
+		font-family: PingFang SC, PingFang SC-Medium;
+		font-weight: 500;
+		text-align: left;
+		color: #333333;
+		margin-top: -10upx;
+	}
+	
+	.accessories_nfo_ac {
+		width: 100%;
+		display: flex;
+		flex-direction: row;
+		flex-wrap: nowrap;
+
+		&:not(:last-child) {
+			margin-bottom: 20upx;
+		}
+
+		.accessories_nfo_title {
+			width: auto;
+			white-space: nowrap;
+		}
+
+		.accessories_nfo_info {
+			width: 100%;
+			box-sizing: border-box;
+			padding-left: 20upx;
+			
+			view {
+				width: 100%;
+				word-break: break-word;
+				// text-align: right;
+			}
+		}
+
+	
+	}
+	.colorts {
+		color: #e95505;
+	}
+}

+ 127 - 0
src/static/style/animation.css

@@ -0,0 +1,127 @@
+@keyframes slide-top{
+	from{
+		transform: translateY(100%);
+		/* opacity: 0; */
+	}
+	to{
+		transform: translateY(0);
+		/* opacity: 1; */
+	}
+}
+@keyframes slide-bottom{
+	from{
+		transform: translateY(0);
+		/* opacity: 0; */
+	}
+	to{
+		transform: translateY(100%);
+		/* opacity: 1; */
+	}
+}
+@keyframes fade-in{
+	from{
+		opacity: 0;
+	}
+	to{
+		opacity: 1;
+	}
+}
+@keyframes fade-out{
+	from{
+		opacity: 1;
+	}
+	to{
+		opacity: 0;
+	}
+}
+@keyframes scaleB{
+	from{
+		transform: scale(0.5);
+	}
+	to{
+		transform: scale(1);
+	}
+}
+@keyframes scaleS{
+	from{
+		transform: scale(1);
+		opacity: 1;
+	}
+	to{
+		transform: scale(0);
+		opacity: 0;
+	}
+}
+@keyframes roate{
+	from{
+		transform: rotate(0);
+	}
+	to{
+		transform: rotate(360deg);
+	}
+}
+@keyframes tiaowu {
+	from {
+		height: 25rpx;
+	}
+
+	to {
+		height: 0rpx;
+	}
+}
+
+@keyframes tiaowu2 {
+	from {
+		height: 10rpx;
+	}
+
+	to {
+		height: 25rpx;
+	}
+}
+
+@keyframes tiaowu3 {
+	0% {
+		height: 18rpx;
+	}
+
+	50% {
+		height: 25rpx;
+	}
+
+	100% {
+		height: 5rpx;
+	}
+}
+.tiaowu {
+	animation: tiaowu .5s ease infinite alternate;
+}
+
+.tiaowu2 {
+	animation: tiaowu2 .5s ease infinite alternate;
+}
+
+.tiaowu3 {
+	animation: tiaowu3 .5s ease infinite alternate;
+}
+.roate{
+	animation: roate .7s linear infinite;
+}
+.slide-top{
+	animation: slide-top .3s ease forwards;
+}
+.slide-bottom{
+	animation: slide-bottom .3s ease forwards;
+}
+.fade-in{
+	animation: fade-in .3s ease forwards;
+}
+.fade-out{
+	animation: fade-out .3s ease forwards;
+}
+.scaleB{
+	animation: scaleB .3s ease forwards;
+}
+.scaleS{
+	animation: scaleS .3s ease forwards;
+}

Diff do ficheiro suprimidas por serem muito extensas
+ 3 - 0
src/static/style/font/iconfont.css


BIN
src/static/style/font/iconfont.eot


Diff do ficheiro suprimidas por serem muito extensas
+ 94 - 0
src/static/style/font/iconfont.svg


BIN
src/static/style/font/iconfont.ttf


BIN
src/static/style/font/iconfont.woff


BIN
src/static/style/font/iconfont.woff2


Diff do ficheiro suprimidas por serem muito extensas
+ 4 - 0
src/static/style/icon-font.css


+ 143 - 0
src/static/style/utils.css

@@ -0,0 +1,143 @@
+/**
+* @date 2020/4/24
+* @author 804986279@qq.com
+ */
+@import './animation.css';
+body {background-color: #F7F7F7;font-size: 28upx;color: #333333;font-family: Helvetica Neue, Helvetica, sans-serif;line-height: 1;}
+text{line-height: 1;}
+view,
+scroll-view,
+swiper,
+button,
+input,
+textarea,
+label,
+navigator,
+image {box-sizing: border-box;}
+button {padding: 0;line-height: 1;margin: 0;background-color: #FFFFFF;}
+button:after {border: none;}
+
+.flex{display: flex;}
+.flex-1{flex:1}
+.flex_wrap{flex-wrap: wrap;}
+.flex_ac{display: flex;align-items: center;}
+.flex_ae{display: flex;align-items: flex-end;}
+.flex_abc{display: flex;align-items: center;justify-content: center}
+.flex_abs{display: flex;align-items: center;justify-content: space-between}
+.flex_aes{display: flex;align-items: flex-end;justify-content: space-between}
+.txt-c{text-align: center;}
+.mask{position: fixed;left: 0;top: 0;bottom: 0;right: 0;background-color: rgba(0,0,0,0.5);z-index: 999;}
+.holder-class{font-size:32rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(187,186,184,1);}
+.tc-1{text-overflow: ellipsis;overflow: hidden;white-space: nowrap;}
+/* .tc-1{text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;line-height: 1.1 !important;} */
+.tc-2{text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;}
+.tc-3{text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;}
+
+
+.fw600{font-weight: 600 !important;}
+.fw500{font-weight: 500 !important;}
+
+
+.pv30{padding-left: 30rpx;padding-right: 30rpx;}
+.ph30{padding-top: 30rpx;padding-bottom: 30rpx;}
+.ph10{padding-top: 10rpx;padding-bottom: 10rpx;}
+.ph40{padding-top: 40rpx;padding-bottom: 40rpx;}
+/*外边距*/
+.mb10{margin-bottom: 10rpx}
+.mb15{margin-bottom: 15rpx}
+.mb20{margin-bottom: 20rpx}
+.mb25{margin-bottom: 25rpx}
+.mb30{margin-bottom: 30rpx}
+.mb40{margin-bottom: 40rpx}
+.mb50{margin-bottom: 50rpx}
+.mb60{margin-bottom: 60rpx}
+.mb70{margin-bottom: 70rpx}
+.mb80{margin-bottom: 80rpx}
+.mb90{margin-bottom: 90rpx}
+.mb100{margin-bottom: 100rpx}
+.mt10{margin-top: 10rpx}
+.mt15{margin-top: 15rpx}
+.mt20{margin-top: 20rpx}
+.mt25{margin-top: 25rpx}
+.mt30{margin-top: 30rpx}
+.mt40{margin-top: 40rpx}
+.mt50{margin-top: 50rpx}
+.mt60{margin-top: 60rpx}
+.mt70{margin-top: 70rpx}
+.mt80{margin-top: 80rpx}
+.mt90{margin-top: 90rpx}
+.mt100{margin-top: 100rpx}
+.mr10{margin-right: 10rpx}
+.mr15{margin-right: 15rpx}
+.mr20{margin-right: 20rpx}
+.mr25{margin-right: 25rpx}
+.mr30{margin-right: 30rpx}
+.mr40{margin-right: 40rpx}
+.mr50{margin-right: 50rpx}
+.mr60{margin-right: 60rpx}
+.mr70{margin-right: 70rpx}
+.mr80{margin-right: 80rpx}
+.mr90{margin-right: 90rpx}
+.mr100{margin-right: 100rpx}
+.ml10{margin-left: 10rpx}
+.ml15{margin-left: 15rpx}
+.ml20{margin-left: 20rpx}
+.ml25{margin-left: 25rpx}
+.ml30{margin-left: 30rpx}
+.ml40{margin-left: 40rpx}
+.ml50{margin-left: 50rpx}
+.ml60{margin-left: 60rpx}
+.ml70{margin-left: 70rpx}
+.ml80{margin-left: 80rpx}
+.ml90{margin-left: 90rpx}
+.ml100{margin-left: 100rpx}
+/*内边距*/
+.pb10{padding-bottom: 10rpx}
+.pb15{padding-bottom: 15rpx}
+.pb20{padding-bottom: 20rpx}
+.pb25{padding-bottom: 25rpx}
+.pb30{padding-bottom: 30rpx}
+.pb40{padding-bottom: 40rpx}
+.pb50{padding-bottom: 50rpx}
+.pb60{padding-bottom: 60rpx}
+.pb70{padding-bottom: 70rpx}
+.pb80{padding-bottom: 80rpx}
+.pb90{padding-bottom: 90rpx}
+.pb100{padding-bottom: 100rpx}
+.pt10{padding-top: 10rpx}
+.pt15{padding-top: 15rpx}
+.pt20{padding-top: 20rpx}
+.pt25{padding-top: 25rpx}
+.pt30{padding-top: 30rpx}
+.pt40{padding-top: 40rpx}
+.pt50{padding-top: 50rpx}
+.pt60{padding-top: 60rpx}
+.pt70{padding-top: 70rpx}
+.pt80{padding-top: 80rpx}
+.pt90{padding-top: 90rpx}
+.pt100{padding-top: 100rpx}
+.pr10{padding-right: 10rpx}
+.pr15{padding-right: 15rpx}
+.pr20{padding-right: 20rpx}
+.pr25{padding-right: 25rpx}
+.pr30{padding-right: 30rpx}
+.pr40{padding-right: 40rpx}
+.pr50{padding-right: 50rpx}
+.pr60{padding-right: 60rpx}
+.pr70{padding-right: 70rpx}
+.pr80{padding-right: 80rpx}
+.pr90{padding-right: 90rpx}
+.pr100{padding-right: 100rpx}
+.pl10{padding-left: 10rpx}
+.pl15{padding-left: 15rpx}
+.pl20{padding-left: 20rpx}
+.pl25{padding-left: 25rpx}
+.pl30{padding-left: 30rpx}
+.pl40{padding-left: 40rpx}
+.pl50{padding-left: 50rpx}
+.pl60{padding-left: 60rpx}
+.pl70{padding-left: 70rpx}
+.pl80{padding-left: 80rpx}
+.pl90{padding-left: 90rpx}
+.pl100{padding-left: 100rpx}
+

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff