|
@@ -51,13 +51,13 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="师傅身份证" prop="idcard" :required="true">
|
|
|
- <el-input type="text" v-model="formData.idcard" :disabled="formType == 2" placeholder="请输入"></el-input>
|
|
|
+ <el-form-item label="师傅身份证" prop="identity" :required="true">
|
|
|
+ <el-input type="text" v-model="formData.identity" :disabled="formType == 2" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="师傅联系电话" prop="phone" :required="true">
|
|
|
- <el-input type="text" v-model="formData.phone" :disabled="formType == 2" placeholder="请输入"></el-input>
|
|
|
+ <el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
|
|
|
+ <el-input type="text" v-model="formData.workerMobile" :disabled="formType == 2" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
@@ -210,8 +210,8 @@
|
|
|
worker: {},
|
|
|
workerName: '',
|
|
|
workerId: '',
|
|
|
- idcard: '',
|
|
|
- phone: '',
|
|
|
+ identity: '',
|
|
|
+ workerMobile: '',
|
|
|
remark: '',
|
|
|
totalAmount: '',
|
|
|
orderUseType: 'INSIDE'
|
|
@@ -225,11 +225,11 @@
|
|
|
worker: [
|
|
|
{ required: true, message: '请选择师傅', trigger: 'change' }
|
|
|
],
|
|
|
- idcard: [
|
|
|
+ identity: [
|
|
|
{ required: true, message: '请输入师傅身份证', trigger: 'blur' },
|
|
|
{ pattern:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '身份证号格式不正确', trigger: 'blur' }
|
|
|
],
|
|
|
- phone: [
|
|
|
+ workerMobile: [
|
|
|
{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
|
|
|
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
|
|
|
],
|
|
@@ -251,24 +251,11 @@
|
|
|
async getDetail(salesId){
|
|
|
const that = this
|
|
|
getDetail({salesId}).then(async res => {
|
|
|
- this.formData.flag = res.data.flag
|
|
|
- this.formData.websit = {websitId: res.data.websitId,name: res.data.websitName}
|
|
|
- this.formData.websitId = res.data.websitId
|
|
|
- this.formData.websitName = res.data.websitName
|
|
|
+ Object.assign(this.formData, res.data, {
|
|
|
+ websit: {websitId: res.data.websitId,name: res.data.websitName},
|
|
|
+ worker: {nickName: res.data.workerName,userId: res.data.workerId}
|
|
|
+ })
|
|
|
this.getWorker()
|
|
|
- this.formData.salesId = res.data.salesId
|
|
|
- this.formData.createBy = res.data.createBy
|
|
|
- this.formData.createTime = res.data.createTime
|
|
|
- this.formData.confirmBy = res.data.confirmBy
|
|
|
- this.formData.confirmTime = res.data.confirmTime
|
|
|
- this.formData.worker = {nickName: res.data.workerName,userId: res.data.workerId}
|
|
|
- this.formData.workerName = res.data.workerName
|
|
|
- this.formData.workerId = res.data.workerId
|
|
|
- this.formData.idcard = res.data.identity
|
|
|
- this.formData.phone = res.data.workerMobile
|
|
|
- this.formData.remark = res.data.remark
|
|
|
- this.formData.orderUseType = res.data.orderUseType
|
|
|
- this.formData.totalAmount = res.data.totalAmount
|
|
|
for(var item of res.data.items){
|
|
|
var ress = await that.getGoods(item.goodsName, 1)
|
|
|
item.goods = {...ress.data,oldPrice:ress.data.price}
|
|
@@ -280,25 +267,11 @@
|
|
|
async getNewDetail(){
|
|
|
const that = this
|
|
|
getNewDetail({id: this.id}).then(async res => {
|
|
|
- this.formData.flag = res.data.flag
|
|
|
- this.formData.websit = {websitId: res.data.websitId,name: res.data.websitName}
|
|
|
- this.formData.websitId = res.data.websitId
|
|
|
- this.formData.websitName = res.data.websitName
|
|
|
+ Object.assign(this.formData, res.data, {
|
|
|
+ websit: {websitId: res.data.websitId,name: res.data.websitName},
|
|
|
+ worker: {nickName: res.data.workerName,userId: res.data.workerId}
|
|
|
+ })
|
|
|
this.getWorker()
|
|
|
- this.formData.salesId = res.data.salesId
|
|
|
- this.formData.partsRetId = res.data.partsRetId
|
|
|
- this.formData.createBy = res.data.createBy
|
|
|
- this.formData.createTime = res.data.createTime
|
|
|
- this.formData.confirmBy = res.data.confirmBy
|
|
|
- this.formData.confirmTime = res.data.confirmTime
|
|
|
- this.formData.worker = {nickName: res.data.workerName,userId: res.data.workerId}
|
|
|
- this.formData.workerName = res.data.workerName
|
|
|
- this.formData.workerId = res.data.workerId
|
|
|
- this.formData.idcard = res.data.identity
|
|
|
- this.formData.phone = res.data.workerMobile
|
|
|
- this.formData.remark = res.data.remark
|
|
|
- this.formData.orderUseType = res.data.orderUseType
|
|
|
- this.formData.totalAmount = res.data.totalAmount
|
|
|
for(var item of res.data.websitPartsRetItemList){
|
|
|
var ress = await that.getGoods(item.goodsName, 1)
|
|
|
item.goods = {...ress.data,oldPrice:ress.data.price,retQty: 1}
|
|
@@ -341,8 +314,8 @@
|
|
|
})
|
|
|
},
|
|
|
changeWorker(e){
|
|
|
- this.formData.idcard = e.idCard
|
|
|
- this.formData.phone = e.mobile
|
|
|
+ this.formData.identity = e.idCard
|
|
|
+ this.formData.workerMobile = e.mobile
|
|
|
this.formData.workerId = e.userId
|
|
|
this.formData.workerName = e.nickName
|
|
|
},
|
|
@@ -415,8 +388,8 @@
|
|
|
websitName: this.formData.websitName,
|
|
|
workerName: this.formData.workerName,
|
|
|
workerId: this.formData.workerId,
|
|
|
- identity: this.formData.idcard,
|
|
|
- workerMobile: this.formData.phone,
|
|
|
+ identity: this.formData.identity,
|
|
|
+ workerMobile: this.formData.workerMobile,
|
|
|
websitPartsRetItems: this.dataList,
|
|
|
orderUseType: this.formData.orderUseType,
|
|
|
file_url: this.formData.file_url.map(item=>item.url).join(","),
|
|
@@ -441,8 +414,8 @@
|
|
|
websitName: this.formData.websitName,
|
|
|
workerName: this.formData.workerName,
|
|
|
workerId: this.formData.workerId,
|
|
|
- identity: this.formData.idcard,
|
|
|
- workerMobile: this.formData.phone,
|
|
|
+ identity: this.formData.identity,
|
|
|
+ workerMobile: this.formData.workerMobile,
|
|
|
websitPartsRetItems: this.dataList,
|
|
|
orderUseType: this.formData.orderUseType,
|
|
|
file_url: this.formData.file_url.map(item=>item.url).join(","),
|
|
@@ -463,8 +436,8 @@
|
|
|
websitName: this.formData.websitName,
|
|
|
workerName: this.formData.workerName,
|
|
|
workerId: this.formData.workerId,
|
|
|
- identity: this.formData.idcard,
|
|
|
- workerMobile: this.formData.phone,
|
|
|
+ identity: this.formData.identity,
|
|
|
+ workerMobile: this.formData.workerMobile,
|
|
|
websitPartsRetItems: this.dataList,
|
|
|
orderUseType: this.formData.orderUseType,
|
|
|
file_url: this.formData.file_url.map(item=>item.url).join(","),
|