123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import api from '../../api/api'
- import data from './formData'
- Page({
- data: {
- data,
- form: {
- "sa_serviceorderid": 0, //sa_brandid<=0时 为新增
- "servicetype": "0",
- "sa_orderid": 0,
- "remarks": "",
- "class1": "",
- "class2": "",
- "reason": "",
- "province": "",
- "city": "",
- "county": "",
- "address": "",
- "scenecontact": "",
- "scenecontactrole": "",
- "scenecontactphonenumber": "",
- "billdate": "",
- "begdate": "",
- }
- },
- async onClick(data) {
- this.data.form = Object.assign({}, this.data.form, data.detail)
- const res = await api._post({
- "id": "20230206091403",
- "content": this.data.form
- })
- console.log("创建", res)
- wx.showToast({
- title: res.code == '1' ? getApp().globalData.Language.getMapText('创建成功') : res.msg,
- icon: "none",
- mask: true
- })
- if (res.code == '1') setTimeout(() => {
- wx.redirectTo({
- url: '/Eservice/agent/serviceBillDetail/index?id=' + res.data.sa_serviceorderid,
- })
- }, 300)
- const rs = await api._post({
- "classname": "system.attachment.Attachment",
- "method": "createFileLink",
- "content": {
- "ownertable": "sa_serviceorder",
- "ownerid": res.data.sa_serviceorderid,
- "usetype": "附件",
- "attachmentids": data.detail.attachmentids
- }
- })
- },
- onLoad(options) {
- getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
- },
- onHide() {
- this.compData = this.selectComponent("#form")
- // this.compData.setObjectData(this.compData.data.formLayoutData.formInfo)
- },
- onUnload() {
- getApp().globalData.pageData = null
- },
- })
|