diff --git a/miniprogram/app.json b/miniprogram/app.json index 8b0203d..65cdde3 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -11,13 +11,15 @@ "pages/orders/orderSort/orderSort", "pages/orders/ordersList/orderPayment/orderPayment", "pages/orders/ordersList/orderDetail/orderDetail", + "pages/purchase/requestOrder/requestOrder", + "pages/purchase/requestOrderDetail/requestOrderDetail", "pages/purchase/buyOrder/buyOrder", + "pages/purchase/buyOrderDetail/buyOrderDetail", "pages/purchase/buyInOrder/buyInOrder", "pages/finance/outcome/outcome", "pages/finance/income/income", "pages/finance/giro/giro", "pages/finance/flow/flow", - "pages/purchase/requestOrder/requestOrder", "pages/purchase/backOrder/backOrder", "pages/base/supplier/supplier", "pages/base/customer/customer", diff --git a/miniprogram/pages/orders/ordersList/orderDetail/orderDetail.wxml b/miniprogram/pages/orders/ordersList/orderDetail/orderDetail.wxml index bc8b5aa..6029352 100644 --- a/miniprogram/pages/orders/ordersList/orderDetail/orderDetail.wxml +++ b/miniprogram/pages/orders/ordersList/orderDetail/orderDetail.wxml @@ -2,55 +2,22 @@ is-login="{{isLogin}}" bind:handleLogin="handleLogin"> - - 经销商: - {{info.custom_name}} - - - 单据日期: - {{info.document_date}} - - - 自定义单号: - {{info.custom_order_no}} - - - 销售人员: - {{info.sales_name}} - - - 客户名称: - {{info.end_user_name}} - - - 客户手机: - {{info.end_user_phone}} - - - 客户地址: - {{info.end_user_address}} - - - 备注: - {{info.comments}} - - - 优惠率: - {{info.discount_rate}}% - - - 收款优惠: - {{info.discount_money}} - - - 优惠后金额: - {{info.discount_last_money}} - + + + + + + + + + + + - + bind:tap="onPreview2" /> diff --git a/miniprogram/pages/orders/ordersList/orderDetail/orderDetail.wxss b/miniprogram/pages/orders/ordersList/orderDetail/orderDetail.wxss index ecbf383..e69de29 100644 --- a/miniprogram/pages/orders/ordersList/orderDetail/orderDetail.wxss +++ b/miniprogram/pages/orders/ordersList/orderDetail/orderDetail.wxss @@ -1,15 +0,0 @@ -.item { - display: inline-flex; - align-items: center; -} - -.item-label { - width: 6em; - display: inline-flex; - justify-content: flex-end; - flex-shrink: 0; -} - -.item-value { - word-break: break-all; -} diff --git a/miniprogram/pages/orders/ordersList/ordersList.wxml b/miniprogram/pages/orders/ordersList/ordersList.wxml index a697b09..70ffb49 100644 --- a/miniprogram/pages/orders/ordersList/ordersList.wxml +++ b/miniprogram/pages/orders/ordersList/ordersList.wxml @@ -81,7 +81,7 @@ 详情 收付款 + bind:tap="onOrderPay" data-index="{{index}}">收款 删除 + data-index2="{{index}}" hover="{{!!produce.produce_info_process.length}}" + arrow="{{!!produce.produce_info_process.length }}" style="padding-right: 0;" /> diff --git a/miniprogram/pages/produce/processManageDetail/processManageDetail.wxss b/miniprogram/pages/produce/processManageDetail/processManageDetail.wxss index 6e2e847..acf114c 100644 --- a/miniprogram/pages/produce/processManageDetail/processManageDetail.wxss +++ b/miniprogram/pages/produce/processManageDetail/processManageDetail.wxss @@ -1,6 +1,8 @@ .tabs { display: inline-flex; margin-bottom: 32rpx; + border-radius: 12rpx; + overflow: hidden; } .tabs-item { diff --git a/miniprogram/pages/purchase/buyOrder/buyOrder.ts b/miniprogram/pages/purchase/buyOrder/buyOrder.ts index c1ecc81..b8ef0a9 100644 --- a/miniprogram/pages/purchase/buyOrder/buyOrder.ts +++ b/miniprogram/pages/purchase/buyOrder/buyOrder.ts @@ -98,6 +98,14 @@ Page({ }); }); }, + onOrderDetail(e: any) { + const data = getDataSet(e); + const index = data.index; + const item = this.data.list[index]; + wx.navigateTo({ + url: `/pages/purchase/buyOrderDetail/buyOrderDetail?head_id=${item.head_id}`, + }); + }, onViewAttachment(e: any) { const data = getDataSet(e); const index = data.index; diff --git a/miniprogram/pages/purchase/buyOrder/buyOrder.wxml b/miniprogram/pages/purchase/buyOrder/buyOrder.wxml index 1ffe3c3..8b97d06 100644 --- a/miniprogram/pages/purchase/buyOrder/buyOrder.wxml +++ b/miniprogram/pages/purchase/buyOrder/buyOrder.wxml @@ -48,6 +48,8 @@ + 查看 + 删除 { + const info = toObject(res.info); + wx.setNavigationBarTitle({ title: `${info.bill_no} 详情` }); + this.setData({ + files: toArray(res.files).map((el) => { + el._file_type = getFileType(el.file_name); + el.file_path = `${OSSBaseUrl}${el.file_path}`; + el._file_size = formatFileSize(el.file_size); + return el; + }), + detail: toArray(res.rows), + info: info, + }); + }); + }, + onPreview(e: any) { + const data = getDataSet(e); + const index = data.index; + const item = this.data.files[index]; + if (item._file_type != 'file') { + mediaPreview([item.file_path], item.file_path); + } + }, + onPreview2() { + const path = `${OSSBaseUrl}${this.data.info.file_name}`; + // console.log(path); + mediaPreview([path], path); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + const { head_id } = options; + this.data.params.head_id = head_id; + loginStatusPage(this); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() {}, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() {}, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() {}, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() {}, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() {}, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() {}, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() {}, +}); diff --git a/miniprogram/pages/purchase/buyOrderDetail/buyOrderDetail.wxml b/miniprogram/pages/purchase/buyOrderDetail/buyOrderDetail.wxml new file mode 100644 index 0000000..a33f641 --- /dev/null +++ b/miniprogram/pages/purchase/buyOrderDetail/buyOrderDetail.wxml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + {{ item.goods_name }} + + + + + + + + + + + + + \ No newline at end of file diff --git a/miniprogram/pages/purchase/buyOrderDetail/buyOrderDetail.wxss b/miniprogram/pages/purchase/buyOrderDetail/buyOrderDetail.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram/pages/purchase/requestOrder/requestOrder.ts b/miniprogram/pages/purchase/requestOrder/requestOrder.ts index 3f452cd..3f6b1e3 100644 --- a/miniprogram/pages/purchase/requestOrder/requestOrder.ts +++ b/miniprogram/pages/purchase/requestOrder/requestOrder.ts @@ -85,6 +85,18 @@ Page({ }); }); }, + onOrderDetail(e: any) { + const data = getDataSet(e); + const index = data.index; + const item = this.data.list[index]; + wx.navigateTo({ + url: `/pages/purchase/requestOrderDetail/requestOrderDetail?head_id=${item.head_id}`, + success: function (res) { + // 通过eventChannel向被打开页面传送数据 + res.eventChannel.emit('requestOrderDetail', { data: item }); + }, + }); + }, onOrderDel(e: any) { const data = getDataSet(e); const index = data.index; diff --git a/miniprogram/pages/purchase/requestOrder/requestOrder.wxml b/miniprogram/pages/purchase/requestOrder/requestOrder.wxml index 7984012..15e3f2d 100644 --- a/miniprogram/pages/purchase/requestOrder/requestOrder.wxml +++ b/miniprogram/pages/purchase/requestOrder/requestOrder.wxml @@ -45,6 +45,8 @@ + 查看 + 删除 { + this.setData({ detail: toArray(res.data) }); + }); + post('ErpDepot/fileList', { head_id: temp.head_id }).then((res: any) => { + this.setData({ + files: toArray(res.data).map((el) => { + el._file_type = getFileType(el.file_name); + el.file_path = `${OSSBaseUrl}${el.file_path}`; + el._file_size = formatFileSize(el.file_size); + return el; + }), + }); + }); + }, + onPreview(e: any) { + const data = getDataSet(e); + const index = data.index; + const item = this.data.files[index]; + if (item._file_type != 'file') { + mediaPreview([item.file_path], item.file_path); + } + }, + onPreview2() { + const path = `${OSSBaseUrl}${this.data.info.excel_path}`; + // console.log(path); + mediaPreview([path], path); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + const { head_id } = options; + this.data.params.head_id = head_id; + const eventChannel: any = this.getOpenerEventChannel(); + if (eventChannel) { + eventChannel.on('requestOrderDetail', (res: any) => { + const record = toObject(res.data); + wx.setNavigationBarTitle({ title: `${record.bill_no} 详情` }); + this.setData({ info: record }); + loginStatusPage(this); + }); + } else { + loginStatusPage(this); + } + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() {}, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() {}, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() {}, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() {}, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() {}, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() {}, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() {}, +}); diff --git a/miniprogram/pages/purchase/requestOrderDetail/requestOrderDetail.wxml b/miniprogram/pages/purchase/requestOrderDetail/requestOrderDetail.wxml new file mode 100644 index 0000000..ccb5490 --- /dev/null +++ b/miniprogram/pages/purchase/requestOrderDetail/requestOrderDetail.wxml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + {{ item.goods_name }} + + + + + + + + + \ No newline at end of file diff --git a/miniprogram/pages/purchase/requestOrderDetail/requestOrderDetail.wxss b/miniprogram/pages/purchase/requestOrderDetail/requestOrderDetail.wxss new file mode 100644 index 0000000..e69de29