|
|
@@ -0,0 +1,76 @@
|
|
|
+const _Http = getApp().globalData.http,
|
|
|
+ currency = require("../../utils/currency"),
|
|
|
+ CNY = (value, symbol = "", precision = 2) => currency(value, {
|
|
|
+ symbol,
|
|
|
+ precision
|
|
|
+ }).format();
|
|
|
+Page({
|
|
|
+ data: {
|
|
|
+
|
|
|
+ },
|
|
|
+ onLoad(options) {
|
|
|
+ console.log(options)
|
|
|
+ let content = Object.assign({
|
|
|
+ "dataid": 2839,
|
|
|
+ "username": "周佳友",
|
|
|
+ "type": 0,
|
|
|
+ "dateType": "本年",
|
|
|
+ "datatype": 1,
|
|
|
+ "typeName": "订单"
|
|
|
+ }, {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 100,
|
|
|
+ "where": {
|
|
|
+ "condition": "",
|
|
|
+ "type": "",
|
|
|
+ "tradefield": ""
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ ids = {
|
|
|
+ "订单": 2025032613405702,
|
|
|
+ "出货": 2025032615330102,
|
|
|
+ "开票": 2025032616343302,
|
|
|
+ "回款": 2025032616352402,
|
|
|
+ };
|
|
|
+ this.setData({
|
|
|
+ content,
|
|
|
+ id: ids[content.typeName],
|
|
|
+ siteid: wx.getStorageSync('userMsg').siteid
|
|
|
+ })
|
|
|
+ /* {"classname":"sysmanage.develop.optiontype.optiontype","method":"optiontypeselect","content":{"pageNumber":1,"pageSize":1000,"typename":"ordertype","parameter":{}},"languagecode":"ZH","accesstoken":"f6f0fdf9f9fb2854b64c3c7c669c0338","systemappid":277} */
|
|
|
+ /* {"classname":"sysmanage.develop.optiontype.optiontype","method":"optiontypeselect","content":{"pageNumber":1,"pageSize":1000,"typename":"tradefield","parameter":{}},"languagecode":"ZH","accesstoken":"f6f0fdf9f9fb2854b64c3c7c669c0338","systemappid":277} */
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ getList(init = false) {
|
|
|
+ _Http.init(this.data.content, init).then(content => {
|
|
|
+ _Http.basic({
|
|
|
+ "id": this.data.id,
|
|
|
+ content
|
|
|
+ }).then(res => {
|
|
|
+ console.log(content.typeName + "明细列表", res)
|
|
|
+ this.selectComponent('#ListBox').automaticSetHei();
|
|
|
+ this.selectComponent('#ListBox').RefreshToComplete();
|
|
|
+ if (res.code != '1') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+
|
|
|
+ /*
|
|
|
+ marketprice
|
|
|
+ amount
|
|
|
+ invoiceamount
|
|
|
+ writeoffamount
|
|
|
+ returnamount
|
|
|
+ price
|
|
|
+ */
|
|
|
+ this.setData({
|
|
|
+ list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
|
|
|
+ "content.pageNumber": res.pageNumber + 1,
|
|
|
+ "content.pageSize": res.pageSize,
|
|
|
+ "content.pageTotal": res.pageTotal,
|
|
|
+ "total": res.total,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+})
|