|
|
@@ -168,7 +168,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="联系人:" label-width="90px" prop="name">
|
|
|
+ <el-form-item label="联系人:" label-width="90px" >
|
|
|
<el-popover
|
|
|
placement="bottom"
|
|
|
width="700"
|
|
|
@@ -243,7 +243,7 @@
|
|
|
<el-divider></el-divider>
|
|
|
</div>
|
|
|
<div style="margin:30px 20px 20px 20px">
|
|
|
- <quoted_price_product :sa_projectid="form.sa_projectid" :type="form.type" ref="quoterPrice" @checkFormImport="onCheckFormImport" @checkForm="onSubmit" @productData="productDataChange"></quoted_price_product>
|
|
|
+ <quoted_price_product :sa_projectid="form.sa_projectid" :type="form.type" ref="quoterPrice" @checkFormImport="onCheckFormImport" @checkForm="onSubmit" @checkFormProject="onSubmit" @productData="productDataChange"></quoted_price_product>
|
|
|
</div>
|
|
|
<div class="fixed__btn__panel">
|
|
|
<el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
|
|
|
@@ -342,7 +342,7 @@ export default {
|
|
|
specialOffer:'否',
|
|
|
sa_quotedpriceid:0, //sat_notice_classid<=0时 为新增
|
|
|
sys_enterpriseid: "",
|
|
|
- contactsid:8,
|
|
|
+ contactsid:0,
|
|
|
sa_projectid: "0",
|
|
|
discountrate: 0,
|
|
|
remarks: "",
|
|
|
@@ -355,13 +355,10 @@ export default {
|
|
|
},
|
|
|
rules:{
|
|
|
projectname:[
|
|
|
- { required: true, message: '请选择项目', trigger: 'blur,change'},
|
|
|
+ { required: true, message: '请选择项目', trigger: 'change'},
|
|
|
],
|
|
|
enterprisename:[
|
|
|
- { required: true, message: '请选择客户', trigger: 'blur,change'},
|
|
|
- ],
|
|
|
- name:[
|
|
|
- { required: true, message: '请选择联系人', trigger: 'blur,change'},
|
|
|
+ { required: true, message: '请选择客户', trigger: 'change'},
|
|
|
]
|
|
|
},
|
|
|
}
|
|
|
@@ -373,15 +370,18 @@ export default {
|
|
|
},
|
|
|
/*创建报价单,获取商品信息*/
|
|
|
onSubmit(){
|
|
|
+ console.log(this.form,"表单123444")
|
|
|
console.log(this.date)
|
|
|
if (this.date.length === 0){
|
|
|
this.form.begdate = ''
|
|
|
this.form.enddate = ''
|
|
|
+ this.form.sa_quotedpriceid = 0
|
|
|
}else {
|
|
|
this.form.begdate = this.date[0]
|
|
|
this.form.enddate = this.date[1]
|
|
|
+ this.form.sa_quotedpriceid = 0
|
|
|
}
|
|
|
- console.log(this.form,"表单")
|
|
|
+ console.log(this.form,"表单123")
|
|
|
this.$refs.form.validate(async (valid) => {
|
|
|
if (!valid) return false
|
|
|
const res = await this.$api.requested({
|
|
|
@@ -389,8 +389,11 @@ export default {
|
|
|
"version":1,
|
|
|
"content": this.form
|
|
|
})
|
|
|
- this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,this.form.type)
|
|
|
- this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
|
|
|
+ console.log(res,"报价单创建数据")
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,this.form.type)
|
|
|
+ this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
|
|
|
+ },500)
|
|
|
})
|
|
|
},
|
|
|
/*导入创建报价单校验*/
|
|
|
@@ -512,7 +515,7 @@ export default {
|
|
|
this.form.projectnum = val.projectnum
|
|
|
this.form.sys_enterpriseid = ''
|
|
|
this.form.enterprisename = ''
|
|
|
- this.form.contactsid = ''
|
|
|
+ this.form.contactsid = 0
|
|
|
this.form.name = ''
|
|
|
this.form.phonenumber = ''
|
|
|
this.projectShow = false
|
|
|
@@ -521,7 +524,7 @@ export default {
|
|
|
customerData(val){
|
|
|
this.form.sys_enterpriseid = val.sys_enterpriseid
|
|
|
this.form.enterprisename = val.enterprisename
|
|
|
- this.form.contactsid = ''
|
|
|
+ this.form.contactsid = 0
|
|
|
this.form.name = ''
|
|
|
this.form.phonenumber = ''
|
|
|
this.customerShow = false
|
|
|
@@ -587,7 +590,8 @@ export default {
|
|
|
const date = new Date()
|
|
|
console.log(date)
|
|
|
this.form.billdate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
|
|
|
- console.log(this.form)
|
|
|
+ this.form.sa_quotedpriceid = 0
|
|
|
+ console.log(this.form,"保定11111")
|
|
|
},
|
|
|
created() {
|
|
|
|