| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- const _Http = getApp().globalData.http;
- Component({
- properties: {
- disabled: {
- type: Boolean
- }
- },
- data: {
- list: [],
- sys_enterpriseid: "",
- "content": {
- "version": 1,
- "nocache": true,
- "pageNumber": 1,
- "pageTotal": 1,
- "total": null,
- "type": 1,
- "where": {
- "condition": ""
- }
- }
- },
- lifetimes: {
- attached: function () {
- getApp().globalData.Language.getLanguagePackage(this)
- }
- },
- methods: {
- getList(id, init) {
- let content = this.data.content;
- content.sys_enterpriseid = id;
- if (init) content.pageNumber = 1
- _Http.basic({
- "id": "20221018102103",
- content
- }).then(res => {
- console.log("报价单", res)
- if (res.code != '1') return wx.showToast({
- title: res.data,
- icon: "none"
- })
- 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,
- "content.total": res.total,
- sys_enterpriseid: id
- });
- })
- },
- addOffers() {
- const {
- enterprisename,
- sys_enterpriseid
- } = getCurrentPages().find(v => ['packageA/setclient/detail', 'packageA/publicCustomer/detail'].includes(v.__route__)).data.detail;
- wx.navigateTo({
- url: `/packageA/offers/addSetclientOffer?data=${JSON.stringify({
- sys_enterpriseid:[enterprisename,[sys_enterpriseid]]
- })}`,
- })
- },
- /* 修改总数 */
- changeTotal() {
- this.setData({
- "content.total": this.data.content.total - 1
- })
- }
- }
- })
|