xiaohaizhao 9 месяцев назад
Родитель
Сommit
82e53d75c3

+ 5 - 1
app.json

@@ -59,7 +59,11 @@
         "favorites/index",
         "activity/bindingProduct/index",
         "deliveryConfirmation/index",
-        "deliveryConfirmation/detail"
+        "deliveryConfirmation/detail",
+        "repair/index",
+        "repair/detail",
+        "repair/insert",
+        "repair/select"
       ]
     },
     {

+ 5 - 0
components/Yl_Filtrate/index.scss

@@ -1,4 +1,9 @@
 @import "./groud.scss";
+
+.groud {
+    padding-right: 0 !important;
+}
+
 .footer {
     display: flex;
     justify-content: space-around;

+ 5 - 4
components/Yl_HeadNav/index.js

@@ -190,10 +190,6 @@ Component({
         },
         /* 搜索 */
         confirmSearch(e) {
-            if (this.data.condition == e.detail.value) return;
-            this.setData({
-                condition: e.detail.value
-            })
             this.triggerEvent("onSearch", e.detail.value)
         },
         /* 开始搜索 */
@@ -216,6 +212,11 @@ Component({
                 }
             }
         },
+        onInput(e) {
+            this.setData({
+                condition: e.detail.value
+            })
+        },
         /* 取消搜索 */
         endSearch() {
             this.setData({

+ 2 - 1
components/Yl_HeadNav/index.scss

@@ -129,6 +129,7 @@
         line-height: 90rpx;
         text-align: center;
         flex-shrink: 0;
+
     }
 }
 
@@ -157,7 +158,7 @@
             color: #333;
         }
 
-        navigator {
+        .iconfont {
             display: flex;
             height: 100%;
             align-items: center;

+ 2 - 2
components/Yl_HeadNav/index.wxml

@@ -12,8 +12,8 @@
 <view class="Yl_head_1" wx:else>
     <view class="search" style="width: {{isFilter?'438rpx':'570rpx'}};">
         <view class="iconfont icon-a-sousuolansousuo" style="padding-left:20rpx;margin-right: 10rpx;" />
-        <input class="input" value="{{condition}}" bindconfirm="confirmSearch" type="text" placeholder="{{placeholder}}" style="flex: 1;" />
-        <navigator wx:if="{{condition}}" bindtap="endSearch" url="#" class="iconfont icon-quxiao" />
+        <input class="input" value="{{condition}}" bindinput="onInput" bindconfirm="confirmSearch" type="text" placeholder="{{placeholder}}" style="flex: 1;" />
+        <view wx:if="{{condition}}" bindtap="endSearch" class="iconfont icon-quxiao" />
     </view>
     <navigator url="#" class="but" bindtap="onChick1" data-id="sort"><text class="iconfont icon-shengxu"></text>排序</navigator>
     <navigator wx:if="{{isFilter}}" url="#" class="but" bindtap="onChick1" data-id="filtrate"><text class="iconfont icon-shaixuan"></text>筛选</navigator>

+ 1 - 1
packageA/betweenFee/index.wxml

@@ -1,6 +1,6 @@
 <import src="index.skeleton.wxml" />
 <template is="skeleton" wx:if="{{loading}}" />
-<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索' bindonSearch="onSearch" />
+<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索关键字' bindonSearch="onSearch" />
 <!-- <van-tabs active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
     <van-tab title="全部" />
     <van-tab title="新建" />

+ 0 - 1
packageA/deliveryConfirmation/detail.scss

@@ -31,7 +31,6 @@
 	}
 
 	.exp {
-		height: 34rpx;
 		line-height: 34rpx;
 		font-size: 26rpx;
 		margin-top: 10rpx;

+ 1 - 1
packageA/dispatchBill/index.wxml

@@ -1,4 +1,4 @@
-<Yl_HeadNav  styleType="1" sort='{{content.sort}}' placeholder='搜索' bindonSearch="onSearch" />
+<Yl_HeadNav  styleType="1" sort='{{content.sort}}' placeholder='搜索关键字' bindonSearch="onSearch" />
 <view class="head" />
 <!-- <van-tabs active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
 	<van-tab title="全部" />

+ 28 - 13
packageA/options/index.js

@@ -3,10 +3,14 @@ Page({
     data: {
         paging: {
             "pageNumber": 1,
-            "pageSize": 9999,
+            "pageSize": 20,
             "pageTotal": 1,
+            "where": {
+                "condition": ""
+            }
         },
         result: [],
+        list: []
     },
     onLoad(options) {
         let item = JSON.parse(options.data);
@@ -43,7 +47,8 @@ Page({
         let {
             pageNumber,
             pageTotal,
-            pageSize
+            pageSize,
+            where
         } = this.data.paging;
         if (init) {
             pageNumber = 1;
@@ -59,23 +64,22 @@ Page({
                 "typename": this.data.item.optionNmae,
                 "parameter": {
                     "siteid": wx.getStorageSync('siteP').siteid
-                }
+                },
+                where
             }
         }).then(res => {
-            if (res.msg != '成功') {
-                wx.showToast({
-                    title: res.data,
-                    icon: "none"
-                })
-                return;
-            };
+            console.log("可选项查询", res)
+            if (res.code != '1') return wx.showToast({
+                title: res.data,
+                icon: "none"
+            });
+            if (!res.pageNumber) res.pageNumber = 1;
             this.setData({
                 list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
                 "paging.pageNumber": res.pageNumber + 1,
                 "paging.pageTotal": res.pageTotal,
                 "paging.total": res.total,
             })
-            console.log("可选项查询", res)
         })
     },
     submit() {
@@ -88,12 +92,23 @@ Page({
         const pages = getCurrentPages();
         pages[pages.length - 2].selectComponent(item.model || "#Form").setOption(item);
         wx.navigateBack();
-        item.setFun && getApp().globalData.optionFun && getApp().globalData.optionFun({
+        /* item.setFun && getApp().globalData.optionFun && getApp().globalData.optionFun({
             item,
             list: this.data.result.map(v => this.data.list.find(s => s.value == v))
-        });
+        }); */
     },
     onReachBottom() {
         this.getList();
     },
+    onSearch({
+        detail
+    }) {
+        this.data.paging.where.condition = detail;
+        this.getList(true);
+    },
+    onClear() {
+        this.onSearch({
+            detail: ""
+        })
+    }
 })

+ 1 - 1
packageA/options/index.json

@@ -1,4 +1,4 @@
 {
     "usingComponents": {},
-    "navigationBarTitleText": "选择"
+    "navigationBarTitleText": ""
 }

+ 5 - 2
packageA/options/index.wxml

@@ -1,11 +1,14 @@
+<view style="position: sticky; top: 0px; z-index: 999; background-color: #F4F5F7; padding-bottom: 20rpx;">
+    <van-search custom-class='search' value="{{ paging.where.condition }}" shape="round" background="#fff" placeholder="请输入搜索关键词" bind:search='onSearch' bind:clear='onClear' />
+</view>
 <van-checkbox-group value="{{ result }}" bind:change="onChange">
     <van-cell-group>
-        <van-cell wx:for="{{ list }}" wx:key="value" title="{{ item.value }}" label="{{item.remarks}}" value-class="value-class" clickable data-item="{{ item }}" bind:click="toggle">
+        <van-cell wx:for="{{ list }}" wx:key="value" title="{{ item.showValue }}" label="{{item.remarks}}" value-class="value-class" clickable data-item="{{ item }}" bind:click="toggle">
             <van-checkbox name="{{ item.value }}" />
         </van-cell>
     </van-cell-group>
 </van-checkbox-group>
-<Yl_Empty wx:if="{{list.length==0}}" />
+<My_empty wx:if="{{list.length==0}}" />
 
 <block wx:if="{{item.optionType == 'checkbox'}}">
     <view style="height: 130rpx;" />

+ 1 - 1
packageA/remitVoucher/index.wxml

@@ -1,6 +1,6 @@
 <import src="index.skeleton.wxml" />
 <template is="skeleton" wx:if="{{loading}}" />
-<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索' bindonSearch="onSearch" />
+<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索关键字' bindonSearch="onSearch" />
 <van-tabs active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
 	<van-tab title="全部" name='' />
 	<van-tab title="新建" name='新建' />

+ 237 - 0
packageA/repair/detail.js

@@ -0,0 +1,237 @@
+const _Http = getApp().globalData.http;
+import Dialog from '@vant/weapp/dialog/dialog';
+Page({
+  data: {
+    sa_aftersalesmagid: null,
+    detail: {},
+    tabsActive: 0,
+    tabsList: [{
+      label: "产品明细",
+      icon: "icon-tabchanpin",
+    }, {
+      label: "系统信息",
+      icon: "icon-tabcaozuojilu1",
+    }],
+    reason: "",
+    focus: false,
+    showAll1: false,
+    showAll2: false,
+    showAll3: false,
+  },
+  onChange(e) {
+    let detail = e.detail,
+      name = e.currentTarget.dataset.name;
+    console.log(detail, name)
+    this.setData({
+      [name]: detail
+    })
+  },
+  onLoad(options) {
+    this.setData({
+      sa_aftersalesmagid: options.id
+    })
+    this.getDetail()
+  },
+  getDetail() {
+    _Http.basic({
+      "id": 20230104160603,
+      "content": {
+        "sa_aftersalesmagid": this.data.sa_aftersalesmagid
+      }
+    }).then(res => {
+      console.log("返修", res)
+      if (res.msg != '成功') return wx.showToast({
+        title: res.msg,
+        icon: "none"
+      })
+      let detail = res.data[0]
+      this.setData({
+        detail,
+        list1: [{
+          label: "序列号",
+          value: detail.machinecode
+        }, {
+          label: "品号",
+          value: detail.itemno
+        }, {
+          label: "品名",
+          value: detail.itemname
+        }, {
+          label: "型号",
+          value: detail.model
+        }, {
+          label: "数量",
+          value: detail.qty
+        }, {
+          label: "单位",
+          value: detail.unitname
+        }, {
+          label: "责任方",
+          value: detail.duty
+        }, {
+          label: "用户要求",
+          value: detail.demand
+        }, {
+          label: "问题描述",
+          value: detail.remarks
+        }],
+        list2: [{
+          label: "姓名",
+          value: detail.name
+        }, {
+          label: "电话",
+          value: detail.phonenumber
+        }, {
+          label: "地址",
+          value: detail.address
+        }, {
+          label: "保修卡号",
+          value: detail.cardno
+        }, {
+          label: "保修截止日期",
+          value: detail.enddate
+        }],
+        list3: [{
+          label: "提交人",
+          value: detail.submitby
+        }, {
+          label: "提交日期",
+          value: detail.submitdate
+        }, {
+          label: "确认人",
+          value: detail.confirmby
+        }, {
+          label: "确认日期",
+          value: detail.confirmdate
+        }, {
+          label: "审核人",
+          value: detail.checkby
+        }, {
+          label: "审核日期",
+          value: detail.checkdate
+        }],
+      })
+      this.partialRenewal()
+    })
+  },
+  tabsChange({
+    detail
+  }) {
+    this.setData({
+      tabsActive: detail
+    });
+    this.partialRenewal();
+  },
+  onInput(e) {
+    this.data.reason = e.detail.value;
+  },
+  tabbarOnClick(e) {
+    const {
+      name
+    } = e.currentTarget.dataset,
+      that = this,
+      sa_aftersalesmagid = this.data.sa_aftersalesmagid;
+    switch (name) {
+      case '编辑':
+        wx.navigateTo({
+          url: '/packageA/repair/insert?data=' + JSON.stringify(that.data.detail),
+        })
+        break;
+      case '删除':
+        wx.showModal({
+          title: '提示',
+          content: `是否删除该返修退货单?`,
+          complete: ({
+            confirm
+          }) => {
+            if (confirm) _Http.basic({
+              "id": 20230104160803,
+              "content": {
+                sa_aftersalesmagids: [sa_aftersalesmagid]
+              }
+            }).then(res => {
+              wx.showToast({
+                title: res.msg == '成功' ? `已删除该返修退货单` : res.msg,
+                icon: "none"
+              });
+              if (res.msg == '成功') {
+                setTimeout(() => {
+                  wx.navigateBack()
+                }, 300)
+              }
+            })
+          }
+        })
+        break;
+      case '提交':
+        wx.showModal({
+          title: '提示',
+          content: '是否确定提交?',
+          confirmText: "提交",
+          complete: ({
+            confirm
+          }) => {
+            if (confirm) _Http.basic({
+              "id": 20230105161603,
+              "content": {
+                sa_aftersalesmagid
+              }
+            }).then(res => {
+              console.log("提交", res)
+              wx.showToast({
+                title: res.msg == '成功' ? '提交成功' : res.msg,
+                icon: "none"
+              })
+              if (res.msg == '成功') that.getDetail();
+            })
+          }
+        })
+        break;
+      case '撤回':
+        const beforeClose = (action) =>
+          new Promise((resolve) => {
+            if (action === 'confirm') {
+              _Http.basic({
+                "id": 2025061316113303,
+                "content": {
+                  sa_aftersalesmagid,
+                  "ischehui": 1,
+                  reason: that.data.reason,
+                }
+              }).then(res => {
+                console.log("撤回", res)
+                wx.showToast({
+                  title: res.msg == '成功' ? '撤回成功' : res.msg,
+                  icon: "none"
+                })
+                if (res.msg == '成功') {
+                  that.getDetail();
+                  resolve(true);
+                } else {
+                  resolve(false);
+                }
+              })
+            } else {
+              resolve(true);
+            }
+          });
+        Dialog.confirm({
+          title: '请填写撤回原因',
+          confirmButtonText: "确定撤回",
+          "confirmButtonColor": "#085CDF",
+          beforeClose,
+        });
+        setTimeout(() => {
+          that.setData({
+            focus: true
+          })
+        }, 300);
+        break;
+    }
+  },
+  onUnload() {
+    const page = getCurrentPages().find(v => v.__route__ == 'packageA/repair/index');
+    if (!page) return;
+    page.updateList();
+  }
+})

+ 7 - 0
packageA/repair/detail.json

@@ -0,0 +1,7 @@
+{
+  "usingComponents": {
+    "van-dialog": "@vant/weapp/dialog/index",
+    "Yl_Headline": "/components/Yl_Headline/index",
+    "Yl_ReportForms": "/components/Yl_ReportForms/index"
+  }
+}

+ 92 - 0
packageA/repair/detail.scss

@@ -0,0 +1,92 @@
+.intr {
+	position: relative;
+	width: 100vw;
+	box-sizing: border-box;
+	background-color: #fff;
+	padding: 20rpx 30rpx;
+
+	.num {
+		height: 40rpx;
+		line-height: 40rpx;
+		font-size: 32rpx;
+		font-family: PingFang SC-Bold, PingFang SC;
+		font-weight: bold;
+		color: #333333;
+	}
+
+	.tags {
+		margin-bottom: 15rpx;
+
+		text {
+			display: inline-block;
+			height: 40rpx;
+			line-height: 40rpx;
+			background: #E7EEFF;
+			border-radius: 20rpx;
+			padding: 0 15rpx;
+			font-size: 20rpx;
+			color: #fff;
+			margin-right: 10rpx;
+		}
+	}
+
+	.exp {
+		line-height: 34rpx;
+		font-size: 26rpx;
+		margin-top: 10rpx;
+		color: #666;
+	}
+
+	.copy {
+		position: absolute;
+		right: 30rpx;
+		top: 20rpx;
+		background-color: #FF9933;
+		border-radius: 12rpx;
+		padding: 0 10rpx;
+		color: #fff;
+		border: none;
+		height: 70rpx;
+	}
+}
+
+
+.footer {
+	display: flex;
+	justify-content: space-between;
+	padding: 0 30rpx;
+	position: fixed;
+	width: 100vw;
+	height: 130rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+	bottom: 0;
+	box-sizing: border-box;
+	z-index: 99;
+	padding-top: 10rpx;
+
+	.but-box {
+		.but {
+			min-width: 160rpx;
+			height: 90rpx;
+			border-radius: 8rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC-Bold, PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			margin-left: 10rpx;
+		}
+
+		.delete {
+			background: var(--warning);
+		}
+	}
+}
+
+.textarea {
+	width: 85%;
+	margin: 20rpx auto 0;
+	border-radius: 8rpx;
+	border: 1rpx solid #c2c2c2;
+	padding: 6rpx 10rpx 10rpx;
+}

+ 57 - 0
packageA/repair/detail.wxml

@@ -0,0 +1,57 @@
+<view class="intr">
+	<view class="num">
+		{{detail.billno}}
+	</view>
+	<view class="exp">
+		单据日期:{{detail.billdate}}
+	</view>
+	<view class="exp">
+		状态:{{detail.status || ' --'}}
+	</view>
+	<view class="exp">
+		经销商编号:{{detail.agentnum || ' --'}}
+	</view>
+	<view class="exp">
+		经销商名称:{{detail.enterprisename || ' --'}}
+	</view>
+	<view class="exp">
+		备注:{{detail.notes || ' --'}}
+	</view>
+	<view class="exp">
+		是否撤回过:{{detail.isrecall ?'是':'否'}}
+	</view>
+	<view class="exp">
+		撤回原因:{{detail.reason || ' --'}}
+	</view>
+</view>
+<view style="height: 10rpx;"></view>
+<Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
+	<view slot='产品明细'>
+		<Yl_Headline title='基本信息' type='switch' switchLabel='仅显示已填信息' switch='{{showAll1}}' data-name="showAll1" bind:callBack='onChange' />
+		<Yl_ReportForms showAll='{{!showAll1}}' list='{{list1}}' />
+		<Yl_Headline title='客户档案' type='switch' switchLabel='仅显示已填信息' switch='{{showAll2}}' data-name="showAll2" bind:callBack='onChange' />
+		<Yl_ReportForms showAll='{{!showAll2}}' list='{{list2}}' />
+	</view>
+	<view slot='系统信息'>
+		<Yl_Headline title='系统信息' type='switch' switchLabel='仅显示已填信息' switch='{{showAll3}}' data-name="showAll3" bind:callBack='onChange' />
+		<Yl_ReportForms showAll='{{!showAll3}}' list='{{list3}}' />
+	</view>
+</Yl_FunTabs>
+<view style="height: 140rpx;" />
+<view class="footer">
+	<view></view>
+	<view wx:if="{{detail.status=='新建' || detail.status=='已撤回'}}" class="but-box">
+		<van-button custom-class='but' color="#3874F6" data-name="编辑" bind:click="tabbarOnClick">编辑</van-button>
+		<van-button custom-class='but' color='#F37B1D' data-name="提交" bind:click="tabbarOnClick">提交</van-button>
+		<van-button custom-class='but' color="#E54D42" data-name="删除" bind:click="tabbarOnClick">删除</van-button>
+	</view>
+	<view wx:elif="{{detail.status=='提交'}}" class="but-box">
+		<van-button custom-class='but bg-orange' color='#F37B1D' data-name="撤回" bind:click="tabbarOnClick">撤回</van-button>
+	</view>
+</view>
+
+<van-dialog id="van-dialog" use-slot>
+	<view style="padding-bottom: 40rpx;">
+		<textarea class="textarea" value='{{reason}}' focus="{{focus}}" bindinput='onInput' placeholder='请填写撤回原因' maxlength='399' auto-height />
+	</view>
+</van-dialog>

+ 146 - 0
packageA/repair/index.js

@@ -0,0 +1,146 @@
+const _Http = getApp().globalData.http,
+  currency = require("../../utils/currency"),
+  CNY = value => currency(value, {
+    symbol: "¥",
+    precision: 2
+  }).format();
+
+
+Page({
+  data: {
+    list: [],
+    "content": {
+      nocache: true,
+      "pageNumber": 1,
+      "pageTotal": 1,
+      "pageSize": 20,
+      "where": {
+        "condition": "",
+        "status": ""
+      },
+    },
+    filtratelist: [{
+      label: "状态",
+      index: null,
+      showName: "value", //显示字段
+      valueKey: "status", //返回Key
+      selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+      value: "", //选中值
+      list: [{
+        value: "新建"
+      }, {
+        value: "撤回"
+      }, {
+        value: "提交"
+      }, {
+        value: "确认"
+      }, {
+        value: "审核"
+      }, {
+        value: "已入库"
+      }, {
+        value: "关闭"
+      }]
+    }]
+  },
+  onLoad(options) {
+    this.setData({
+      userrole: wx.getStorageSync('userrole'),
+      insert: wx.getStorageSync('auth').wrepair.options.some(v => v == 'insert'), //查询新增权限
+    })
+    this.getList(true)
+  },
+  /* 获取产品 */
+  getList(init = false) {
+    if (init.detail != undefined) init = init.detail;
+    let content = this.data.content;
+    if (init) content.pageNumber = 1;
+    if (content.pageNumber > content.pageTotal) return;
+    _Http.basic({
+      "id": 20230105161503,
+      content
+    }).then(res => {
+      console.log("返修退货申请单", res)
+      this.selectComponent('#ListBox').RefreshToComplete();
+      this.selectComponent("#ListBox").setHeight(".tab", this);
+      res.data = res.data.map(v => {
+        v.returnamount = CNY(v.returnamount)
+        return v
+      })
+      this.setData({
+        list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+        "content.pageNumber": res.pageNumber + 1,
+        "content.pageTotal": res.pageTotal,
+        "content.sort": res.sort,
+        "content.total": res.total,
+      })
+    })
+  },
+  updateList() {
+    let content = JSON.parse(JSON.stringify(this.data.content));
+    content.pageSize = (content.pageNumber - 1) * content.pageSize;
+    content.pageNumber = 1;
+    _Http.basic({
+      id: '20230105161503',
+      content
+    }).then(res => {
+      console.log("更新", res);
+      if (res.code == '1') {
+        res.data = res.data.map(v => {
+          v.returnamount = CNY(v.returnamount)
+          return v
+        })
+        page.setData({
+          list: res.data
+        })
+      }
+    })
+  },
+  onSearch({
+    detail
+  }) {
+    if (detail != this.data.content.where.condition) {
+      this.setData({
+        "content.where.condition": detail
+      })
+      this.getList(true)
+    }
+  },
+  toAdd() {
+    _Http.basic({
+      "id": 20230105110003,
+      content: {
+        pageSize: 1
+      }
+    }).then(res => {
+      console.log("选择序列号", res)
+      if (res.msg == '成功') {
+        if (res.total == 1) {
+          _Http.skuItem = res.data[0];
+          wx.navigateTo({
+            url: '/packageA/repair/insert',
+          })
+        } else if (res.total == 0) {
+          wx.showToast({
+            title: '无可选择序列号',
+            icon: "none"
+          })
+        }
+      } else {
+        wx.navigateTo({
+          url: '/packageA/repair/select'
+        })
+      }
+    })
+  },
+  /* 处理筛选 */
+  handleFilter(e) {
+    e.detail.condition = this.data.content.where.condition;
+    e.detail.begindate = e.detail.startdate
+    this.setData({
+      "content.where": e.detail
+    })
+    console.log("this.data.content", this.data.content)
+    this.getList(true)
+  },
+})

+ 3 - 0
packageA/repair/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 64 - 0
packageA/repair/index.scss

@@ -0,0 +1,64 @@
+@import "../../static/filter.scss";
+
+.item {
+	width: 100vw;
+	padding-left: 30rpx;
+	box-sizing: border-box;
+	margin-bottom: 20rpx;
+	background-color: #ffffff;
+
+	.top {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		height: 80rpx;
+		width: 100%;
+		border-bottom: 1rpx solid #ddd;
+		box-sizing: border-box;
+		padding-right: 30rpx;
+		font-size: 28rpx;
+	}
+
+	.content {
+		position: relative;
+
+		.num {
+			font-size: 28rpx;
+			color: #333333;
+			padding: 20rpx 0;
+		}
+
+		.exp {
+			line-height: 34rpx;
+			font-size: 24rpx;
+			margin-bottom: 8rpx;
+			color: #999999;
+		}
+
+		.amount {
+			position: absolute;
+			font-size: 28rpx;
+			color: #FF3B30;
+			bottom: 0;
+			right: 30rpx;
+		}
+	}
+
+	.bottom {
+		height: 72rpx;
+		line-height: 72rpx;
+		margin-top: 12rpx;
+		border-top: 1rpx solid #ddd;
+		box-sizing: border-box;
+		padding-right: 30rpx;
+		font-size: 24rpx;
+		color: #666666;
+	}
+}
+
+/* 文本行数限制 */
+.line-1 {
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+}

+ 83 - 0
packageA/repair/index.wxml

@@ -0,0 +1,83 @@
+<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索关键字' bindonSearch="onSearch" isFilter />
+<view class="tab" style="height: 20rpx;" />
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+	<navigator url="/packageA/repair/detail?id={{item.sa_aftersalesmagid}}" class="item" wx:for="{{list}}" wx:key="sa_aftersalesmagid">
+		<view class="top">
+			单据日期:{{item.billdate}}
+			<view style="color: {{set.color(item.status)}};">
+				{{item.status}}
+			</view>
+		</view>
+		<view class="content">
+			<view class="num">
+				返修单号:{{item.billno||" --"}}
+			</view>
+			<view class="exp">
+				品名:{{item.itemname || ' --'}}
+			</view>
+			<view class="exp">
+				型号:{{item.model || ' --'}}
+			</view>
+			<view class="exp">
+				序列号:{{item.machinecode || ' --'}}
+			</view>
+			<view class="exp">
+				客户姓名:{{item.name || ' --'}}
+			</view>
+			<view class="exp">
+				电话:{{item.phonenumber || ' --'}}
+			</view>
+			<view class="exp">
+				问题描述:{{item.remarks || ' --'}}
+			</view>
+			<view class="exp">
+				提交日期:{{item.submitdate || ' --'}}
+			</view>
+			<view class="exp">
+				入库时间:{{item.qqq || ' --'}}
+			</view>
+			<view class="exp">
+				进仓日期:{{item.qqq || ' --'}}
+			</view>
+			<view class="exp">
+				发货时间:{{item.qqq || ' --'}}
+			</view>
+			<view class="exp">
+				维修费 :{{item.returnamount || ' --'}}
+			</view>
+			<view class="exp">
+				制单方:{{item.createflag?'经销商':'客户'}}
+			</view>
+			<view class="exp">
+				撤回原因 :{{item.reason || ' --'}}
+			</view>
+		</view>
+		<view class="bottom line-1">
+			备注:{{item.notes ||'--'}}
+		</view>
+	</navigator>
+	<Yl_Empty wx:if="{{list.length==0}}" />
+	<view style="height: 20px;" />
+</Yl_ListBox>
+<Yl_FloatingButton wx:if="{{insert}}" bindtap="toAdd" />
+<Yl_Filtrate id='Filtrate' show='{{filtrate}}' list="{{filtratelist}}" bindhandle="handleFilter" />
+<wxs module="set">
+	module.exports = {
+		color: function (statu) {
+			var color = '#999999';
+			switch (statu) {
+				case "审核":
+					color = '#FA8C16';
+					break;
+				case "提交":
+					color = '#52C41A';
+					break;
+				case "新建":
+					color = '#333333';
+					break;
+			};
+			return color;
+		}
+	}
+</wxs>
+<wxs src="/utils/hidePrice.wxs" module="handleHide" />

+ 244 - 0
packageA/repair/insert.js

@@ -0,0 +1,244 @@
+const _Http = getApp().globalData.http,
+  getTime = require("../../utils/getTime");
+
+Page({
+  data: {
+
+  },
+  onLoad(options) {
+    let data = {},
+      content = {
+        "sa_aftersalesmagid": "0"
+      };
+    if (_Http.skuItem) {
+      data = JSON.parse(JSON.stringify(_Http.skuItem))
+      data.machinecode = [data.sku];
+      data.name = data.contact;
+      data.billdate = getTime.formatTime(new Date(), '-').split(' ')[0];
+      delete _Http.skuItem
+    } else if (options.data) {
+      data = JSON.parse(options.data)
+      data.machinecode = [data.machinecode];
+      content = data;
+    }
+    let form = [{
+        label: "单据日期",
+        error: false,
+        errMsg: "",
+        type: "date",
+        value: "",
+        placeholder: "单据日期",
+        valueName: "billdate",
+        disabled: true
+      }, {
+        label: "序列号",
+        error: false,
+        errMsg: "",
+        type: "route",
+        url: "/packageA/repair/select",
+        params: {},
+        value: "",
+        placeholder: "选择产品",
+        valueName: "machinecode",
+        interrupt: true,
+        required: true
+      }, {
+        label: "品号",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "品号",
+        disabled: true,
+        valueName: "itemno"
+      }, {
+        label: "品名",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "输入品名",
+        disabled: false,
+        valueName: "itemname"
+      }, {
+        label: "型号",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "输入型号",
+        disabled: false,
+        valueName: "model"
+      }, {
+        label: "责任方",
+        error: false,
+        errMsg: "",
+        type: "option",
+        optionNmae: "duty",
+        optionType: "radio", //复选   radio 单选
+        value: "",
+        placeholder: "选择责任方",
+        disabled: false,
+        valueName: "duty"
+      }, {
+        label: "用户要求",
+        error: false,
+        errMsg: "",
+        type: "option",
+        optionNmae: "demand",
+        value: "",
+        placeholder: "选择要求",
+        disabled: false,
+        valueName: "demand"
+      }, {
+        label: "问题描述",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "问题描述",
+        disabled: false,
+        valueName: "remarks"
+      },
+      {
+        label: "规格尺寸",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "规格尺寸",
+        disabled: false,
+        valueName: "spec"
+      }, {
+        label: "数量",
+        error: false,
+        errMsg: "",
+        type: "digit",
+        value: "",
+        placeholder: "数量",
+        disabled: false,
+        valueName: "qty"
+      }, {
+        label: "单位",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "数量单位",
+        disabled: false,
+        valueName: "unitname"
+      },
+      {
+        label: "进货日期",
+        error: false,
+        errMsg: "",
+        type: "date",
+        value: "",
+        placeholder: "选择进货日期",
+        valueName: "stockdate"
+      }, {
+        label: "客户",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "输入客户姓名",
+        disabled: false,
+        valueName: "name"
+      }, {
+        label: "电话",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "输入客户电话",
+        disabled: false,
+        valueName: "phonenumber"
+      }, {
+        label: "地址",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "输入客户地址",
+        disabled: false,
+        valueName: "address"
+      }, {
+        label: "保修卡号",
+        error: false,
+        errMsg: "",
+        type: "text",
+        value: "",
+        placeholder: "保修卡号",
+        disabled: true,
+        valueName: "cardno"
+      }, {
+        label: "保修到期日期",
+        error: false,
+        errMsg: "",
+        type: "date",
+        value: "",
+        placeholder: "保修到期日期",
+        valueName: "enddate",
+        disabled: true
+      }
+    ]
+    this.setData({
+      form: form.map(v => {
+        v.value = data[v.valueName] || v.value;
+        return v
+      }),
+      content
+    })
+    this.selectComponent('#Form').confirm()
+  },
+  changeForm(data) {
+    data.machinecode = [data.sku];
+    data.name = data.contact;
+    this.setData({
+      form: this.data.form.map(v => {
+        v.value = data[v.valueName] || v.value;
+        return v
+      })
+    })
+    wx.navigateBack()
+  },
+  // 是否显示全部
+  onChange({
+    detail
+  }) {
+    this.setData({
+      showAll: detail
+    })
+  },
+  submit() {
+    let content = {
+      ...this.data.content,
+      ...this.selectComponent("#Form").submit()
+    }
+    content.machinecode = content.machinecode[0]
+    _Http.basic({
+      "id": "20230104160503",
+      content,
+    }).then(res => {
+      console.log("新建", res)
+      wx.showToast({
+        title: res.msg == '成功' ? '保存成功' : res.msg,
+        icon: "none",
+        mask: res.msg == '成功'
+      })
+      if (res.msg == '成功') {
+        if (content.sa_aftersalesmagid) getCurrentPages()[getCurrentPages().length - 2].getDetail()
+        setTimeout(() => {
+          if (content.sa_aftersalesmagid) {
+            wx.navigateBack()
+          } else {
+            wx.redirectTo({
+              url: "/packageA/repair/detail?id=" + res.data[0].sa_aftersalesmagid
+            })
+          }
+        }, 300);
+      }
+    })
+  },
+})

+ 5 - 0
packageA/repair/insert.json

@@ -0,0 +1,5 @@
+{
+	"usingComponents": {
+		"Yl_Headline": "/components/Yl_Headline/index"
+	}
+}

+ 26 - 0
packageA/repair/insert.scss

@@ -0,0 +1,26 @@
+.footer {
+	display: flex;
+	justify-content: center;
+	padding: 0 30rpx;
+	position: fixed;
+	width: 100vw;
+	height: 130rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+	bottom: 0;
+	box-sizing: border-box;
+	z-index: 9999;
+	padding-top: 10rpx;
+
+	.but {
+			width: 690rpx;
+			height: 90rpx;
+			background: var(--warning);
+			border-radius: 16rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC-Bold, PingFang SC;
+			font-weight: bold;
+			color: #fff;
+	}
+
+}

+ 8 - 0
packageA/repair/insert.wxml

@@ -0,0 +1,8 @@
+<Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
+<Yl_Field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt">
+	<view slot='discountrate' style="margin-right: 36rpx;">%</view>
+</Yl_Field>
+<view style="height: 150rpx;"></view>
+<view class="footer">
+	<van-button custom-class='but' disabled="{{disabled}}" bind:click="submit">保存</van-button>
+</view>

+ 69 - 0
packageA/repair/select.js

@@ -0,0 +1,69 @@
+const _Http = getApp().globalData.http;
+Page({
+  data: {
+    "content": {
+      nocache: true,
+      "pageNumber": 1,
+      "pageTotal": 1,
+      "pageSize": 20,
+      "where": {
+        "condition": "",
+      },
+    },
+  },
+  onLoad() {
+    this.getList(true)
+  },
+  /* 获取产品 */
+  getList(init = false) {
+    if (init.detail != undefined) init = init.detail;
+    let content = this.data.content;
+    if (init) content.pageNumber = 1;
+    if (content.pageNumber > content.pageTotal) return;
+    _Http.basic({
+      "id": 20230105110003,
+      content
+    }).then(res => {
+      console.log("选择序列号", res)
+      this.selectComponent('#ListBox').RefreshToComplete();
+      this.selectComponent("#ListBox").setHeight(".tab", this);
+      this.setData({
+        list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+        "content.pageNumber": res.pageNumber + 1,
+        "content.pageTotal": res.pageTotal,
+        "content.sort": res.sort,
+        "content.total": res.total,
+      })
+    })
+  },
+  onClick(e) {
+    const {
+      item
+    } = e.currentTarget.dataset;
+    let page = getCurrentPages()[getCurrentPages().length - 2]
+    if (page.__route__ = "packageA/repair/insert") {
+      page.changeForm(item)
+    } else {
+      _Http.skuItem = item;
+      wx.redirectTo({
+        url: '/packageA/repair/insert',
+      })
+    }
+  },
+  onSearch({
+    detail
+  }) {
+    if (this.data.content.where.condition == detail) return;
+    this.setData({
+      "content.where.condition": detail
+    })
+    this.getList(true)
+  },
+  onClear() {
+    if (this.data.content.where.condition == "") return;
+    this.setData({
+      "content.where.condition": ""
+    })
+    this.getList(true)
+  },
+})

+ 3 - 0
packageA/repair/select.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 22 - 0
packageA/repair/select.scss

@@ -0,0 +1,22 @@
+.item {
+	background-color: #fff;
+	padding: 20rpx 30rpx;
+	box-sizing: border-box;
+
+
+	.title {
+		line-height: 40rpx;
+		font-size: 28rpx;
+		color: #000000;
+		font-weight: 600;
+		margin-bottom: 10rpx;
+	}
+
+	.row {
+		line-height: 34rpx;
+		font-size: 24rpx;
+		color: #333333;
+		margin-top: 8rpx;
+	}
+
+}

+ 16 - 0
packageA/repair/select.wxml

@@ -0,0 +1,16 @@
+<van-search value="{{ content.where.content }}" shape='round' placeholder="请输入搜索关键词" bind:search='onSearch' bind:clear='onClear' />
+<view class="tab" style="height: 20rpx;" />
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+	<navigator url="#" class="item" wx:for="{{list}}" wx:key="sa_aftersalesmagid" data-item="{{item}}" bind:tap="onClick">
+		<view class="title">序列号:{{item.sku || ' --'}}</view>
+		<view class="row">品号:{{item.itemno || ' --'}}</view>
+		<view class="row">品名:{{item.itemname || ' --'}}</view>
+		<view class="row">型号:{{item.model || ' --'}}</view>
+		<view class="row">单位:{{item.unitname || ' --'}}</view>
+		<view class="row">客户名称:{{item.contact || ' --'}}</view>
+		<view class="row">电话:{{item.phonenumber || ' --'}}</view>
+		<view class="row">客户地址:{{item.address || ' --'}}</view>
+	</navigator>
+	<Yl_Empty wx:if="{{list.length==0}}" />
+	<view style="height: 20px;" />
+</Yl_ListBox>

+ 1 - 1
packageA/returnOne/index.wxml

@@ -1,7 +1,7 @@
 <view class="DrawerPage {{modalName=='viewModal'?'show':''}}">
 	<import src="index.skeleton.wxml" />
 	<template is="skeleton" wx:if="{{loading}}" />
-	<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索' bindonSearch="onSearch" isFilter />
+	<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索关键字' bindonSearch="onSearch" isFilter />
 	<!-- 	<van-tabs active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
 		<van-tab title="全部" />
 		<van-tab title="新建" />

+ 1 - 1
packageA/shipment/index.wxml

@@ -1,7 +1,7 @@
 <import src="index.skeleton.wxml"/>
 <template is="skeleton" wx:if="{{loading}}" />
 
-<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索' bindonSearch="onSearch" />
+<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索关键字' bindonSearch="onSearch" />
 <!-- <van-tabs active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
     <van-tab title="待收货" />
     <van-tab title="已收货" />

+ 1 - 1
packageA/toolBill/index.wxml

@@ -1,6 +1,6 @@
 <import src="index.skeleton.wxml"/>
 <template is="skeleton" wx:if="{{loading}}" />
-<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索' bindonSearch="onSearch" />
+<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索关键字' bindonSearch="onSearch" />
 <van-tabs class="tabs" active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
     <van-tab title="全部" />
     <van-tab title="新建" />

+ 5 - 0
pages/index/index.js

@@ -173,6 +173,11 @@ Page({
 					key: "WGoodsReceiptConfirmationForm",
 					path: "/packageA/deliveryConfirmation/index",
 					icon: "icon-shouhuo"
+				}, {
+					name: "返修退货申请单",
+					key: "wrepair",
+					path: "/packageA/repair/index",
+					icon: "icon-shouhuo"
 				}];
 				let edd = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["E-订单"], ["商品档案", "销售管理", "财务管理", "售后管理", "发货管理", "业绩查询", '消息中心']).concat(getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["通用"], ['消息中心'])),
 					list = [];

+ 4 - 0
static/font-icon.wxss

@@ -17,6 +17,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-quxiao:before {
+  content: "\e686";
+}
+
 .icon-a-wodemendianxinxidianhua:before {
   content: "\e64c";
 }

Разница между файлами не показана из-за своего большого размера
+ 0 - 1
static/stylesheet.wxss


Некоторые файлы не были показаны из-за большого количества измененных файлов