|
@@ -357,7 +357,7 @@
|
|
|
import WorderAddOrUpdate from '../worder/add-or-update-dialog'
|
|
|
import PreviewComponent from '@/views/modules/common/preview-component'
|
|
|
import {taskTypeOption} from '@/utils/enums'
|
|
|
-
|
|
|
+ import {getCurrentUserInfo} from '@/api/user'
|
|
|
export default {
|
|
|
name: 'order-add-or-update',
|
|
|
components: {PreviewComponent, WorderAddOrUpdate, CusComponent, UploadComponent, UserComponent, AddOrUpdate},
|
|
@@ -406,14 +406,23 @@ export default {
|
|
|
this.stepList = []
|
|
|
this.logList = []
|
|
|
this.dataForm = {
|
|
|
- rateVal: 0
|
|
|
+ rateVal: 0,
|
|
|
+ salesmanId: ''
|
|
|
}
|
|
|
this.productDetails = []
|
|
|
this.workInfoDetails = []
|
|
|
this.visible = true
|
|
|
this.id = id || 0
|
|
|
this.display = display
|
|
|
- if (!id) return
|
|
|
+
|
|
|
+ if (!id) {
|
|
|
+ await getCurrentUserInfo().then(({data}) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ this.dataForm.salesmanId = data.data.userId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
await getOrderDetail(this.id).then(({data}) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataForm = data.data
|
|
@@ -601,7 +610,9 @@ export default {
|
|
|
contractOption.push({
|
|
|
label: item.contractNumber,
|
|
|
value: item.contractNumber,
|
|
|
- data: item.cusCBookProducts
|
|
|
+ data: item.cusCBookProducts,
|
|
|
+ customerId: item.customerId,
|
|
|
+ customerName: item.customerName
|
|
|
})
|
|
|
})
|
|
|
}
|
|
@@ -617,6 +628,8 @@ export default {
|
|
|
t.unit = t.unitName
|
|
|
this.addItem(t)
|
|
|
})
|
|
|
+ this.dataForm.customerId = item.customerId
|
|
|
+ this.dataForm.customerName = item.customerName
|
|
|
}
|
|
|
}
|
|
|
}
|