|
@@ -897,6 +897,44 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
+ created() {
|
|
|
+ if (this.$route?.query?.orderBaseId) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '正在前往创建工作联络函页面......',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ })
|
|
|
+ this.openForm(() => {
|
|
|
+ this.formData.orderId = this.$route?.query?.orderBaseId
|
|
|
+ orderBaseDetail({
|
|
|
+ orderBaseId: this.$route?.query?.orderBaseId,
|
|
|
+ returnErr: true
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ loading.close()
|
|
|
+ if (res.data.orderProducts.length == 1) {
|
|
|
+ this.formData.mainId = res.data.orderProducts?.[0]?.mainId || ''
|
|
|
+ this.formData.mainName = res.data.orderProducts?.[0]?.mainName || ''
|
|
|
+ }
|
|
|
+ this.formData.orderSmallType = res.data?.orderSmallType || ''
|
|
|
+ this.formData.orderSmallTypeText = res.data?.orderSmallTypeText || ''
|
|
|
+ this.formData.orderCreateTime = res.data?.createTime || ''
|
|
|
+ this.formData.websitId = res.data?.websitId || ''
|
|
|
+ this.formData.websitName = res.data?.websitName || ''
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.formData.mainId = ''
|
|
|
+ this.formData.mainName = ''
|
|
|
+ this.formData.orderSmallType = ''
|
|
|
+ this.formData.orderSmallTypeText = ''
|
|
|
+ this.formData.orderCreateTime = ''
|
|
|
+ this.formData.websitId = ''
|
|
|
+ this.formData.websitName = ''
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 列表请求函数
|
|
|
getList(p, cb) {
|
|
@@ -928,7 +966,7 @@ export default {
|
|
|
this.recordSelected = data
|
|
|
},
|
|
|
// 打开创建弹窗
|
|
|
- openForm() {
|
|
|
+ openForm(cb) {
|
|
|
Promise.all([
|
|
|
getWebsit({ status: true }),
|
|
|
letterManagerListUser({
|
|
@@ -968,6 +1006,7 @@ export default {
|
|
|
...data
|
|
|
}
|
|
|
})
|
|
|
+ cb?.()
|
|
|
this.formDialog = true
|
|
|
})
|
|
|
},
|