|
@@ -74,16 +74,16 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24" v-if="isPhone">
|
|
|
- <el-form-item label="联系方式:" label-width="100px" >
|
|
|
+ <el-form-item label="联系方式:" label-width="100px" :rules="{ required: true, message: '请输入联系方式', trigger: 'change'}">
|
|
|
<el-button-group >
|
|
|
<el-radio v-model="isPhone" :label="true" disabled>手机号</el-radio>
|
|
|
<el-radio v-model="isPhone" :label="false" disabled>座机电话</el-radio>
|
|
|
</el-button-group>
|
|
|
- <el-input v-model="phonenumber" disabled placeholder="请输入手机号" style="width: 100%;margin-top: 10px" @input="telephoneChange('手机')"></el-input>
|
|
|
+ <el-input v-model="phonenumber" disabled placeholder="请输入手机号" style="width: 100%;margin-top: 10px" ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24" v-if="!isPhone">
|
|
|
- <el-form-item label="联系方式:" label-width="100px" >
|
|
|
+ <el-form-item label="联系方式:" label-width="100px" :rules="{ required: true, message: '请输入联系方式', trigger: 'change'}">
|
|
|
<el-button-group disabled>
|
|
|
<el-radio v-model="isPhone" :label="true" disabled>手机号</el-radio>
|
|
|
<el-radio v-model="isPhone" :label="false" disabled>座机电话</el-radio>
|
|
@@ -96,8 +96,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24" >
|
|
|
- <el-form-item label="报价金额:" label-width="100px" >
|
|
|
- <el-input v-model="form.quotedpriceamount" autocomplete="off" placeholder="项目编号" disabled></el-input>
|
|
|
+ <el-form-item label="报价金额:" label-width="100px" prop="quotedpriceamount">
|
|
|
+ <el-input v-model="form.quotedpriceamount" autocomplete="off" placeholder="报价金额" @change="quotedpriceamountChange(form.quotedpriceamount)"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
@@ -165,11 +165,16 @@
|
|
|
<el-input v-model="form.remarks" autocomplete="off" placeholder="请输入备注信息" type="textarea" autosize></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="附件上传:" label-width="100px" prop="remarks">
|
|
|
+ <upload @uploadGet="loading = true" ref="uploadRef" class="inline-16" :folderid="folderid" :bindData="{ ownertable: 'sa_quotedprice', ownerid: ownerid, usetype: 'default' }" title="上传报价清单至附件" @onSuccess="uploadSuccess"></upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-form>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div class="fixed__btn__panel">
|
|
|
- <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
|
|
|
+ <el-button size="small" @click="onClose" class="normal-btn-width" :disabled="loading">取 消</el-button>
|
|
|
<el-button size="small" type="primary" @click="getSubmit" :loading="loading" class="normal-btn-width">确 定</el-button>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
@@ -183,10 +188,11 @@ import {mapGetters} from "vuex";
|
|
|
|
|
|
import selectTemplate from '@/template/quotation/index.vue'
|
|
|
import contactsNewTemplate from '@/template/contactsNewTemplate/index1'
|
|
|
+import upload from '@/template/upload/index'
|
|
|
export default {
|
|
|
name: "ProjectQuotationAdd",
|
|
|
props:["drawerShow","typeData"],
|
|
|
- components:{quoted_price_product,selectSalesman,selectTemplate,contactsNewTemplate},
|
|
|
+ components:{quoted_price_product,selectSalesman,selectTemplate,contactsNewTemplate,upload},
|
|
|
data(){
|
|
|
var discountrate = (rule,value,callback) =>{
|
|
|
if (this.form.discountrate < 0 || this.form.discountrate > 100){
|
|
@@ -196,6 +202,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ ownerid:'',
|
|
|
+ folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
|
|
|
search:'',
|
|
|
title:'',
|
|
|
projectShow:false,
|
|
@@ -292,7 +300,8 @@ export default {
|
|
|
"1、报价为含税13%税率, 含运费 ",
|
|
|
"2、报价有限期 2023-02-02 13:16:47至2023-02-22 13:16:47",
|
|
|
],
|
|
|
- quotedpriceamount:''
|
|
|
+ quotedpriceamount:'',
|
|
|
+ iscreatenewid:0
|
|
|
},
|
|
|
rules:{
|
|
|
projectname:[
|
|
@@ -314,22 +323,23 @@ export default {
|
|
|
{ required: true, message: '请填写报价金额', trigger: 'blur'},
|
|
|
{ pattern:/^[0-9]+\.{0,1}[0-9]{0,4}$/,message: '输入不合法,请输入数值',trigger: 'blur'},
|
|
|
],
|
|
|
- /*name:[
|
|
|
+ name:[
|
|
|
{ required: true, message: '请选择联系人', trigger: 'change'},
|
|
|
- ]*/
|
|
|
+ ]
|
|
|
},
|
|
|
itemtype:[],
|
|
|
isPhone:true,
|
|
|
areaCode:'',
|
|
|
telephone:'',
|
|
|
- phonenumber:''
|
|
|
+ phonenumber:'',
|
|
|
+ loading:false
|
|
|
}
|
|
|
},
|
|
|
- computed:{
|
|
|
+ /*computed:{
|
|
|
...mapGetters({
|
|
|
loading:'loading'
|
|
|
})
|
|
|
- },
|
|
|
+ },*/
|
|
|
methods:{
|
|
|
onClose(){
|
|
|
this.drawer = false
|
|
@@ -397,14 +407,20 @@ export default {
|
|
|
|
|
|
this.$refs.form.validate(async (valid) => {
|
|
|
if (!valid) return false
|
|
|
- this.$store.commit('setLoading',true)
|
|
|
+ /*this.$store.commit('setLoading',true)*/
|
|
|
+ this.loading = true
|
|
|
this.form.discountrate = this.form.discountrate?(this.form.discountrate / 100).toFixed(4):''
|
|
|
+ this.form.sa_quotedpriceid = this.ownerid
|
|
|
const res = await this.$api.requested({
|
|
|
"id": 20221020164803,
|
|
|
"content": this.form
|
|
|
})
|
|
|
+ if (res.code == 0){
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
this.tool.showMessage(res,() => {
|
|
|
- this.$store.commit('setLoading',false)
|
|
|
+ /*this.$store.commit('setLoading',false)*/
|
|
|
+ this.loading = false
|
|
|
this.drawer = false
|
|
|
this.$emit('addSuccess')
|
|
|
this.$store.dispatch('changeDetailDrawer',true)
|
|
@@ -581,9 +597,35 @@ export default {
|
|
|
this.telephone = ''
|
|
|
}
|
|
|
},
|
|
|
+ async queryID(){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 202400904102104,
|
|
|
+ "content": {}
|
|
|
+ })
|
|
|
+ this.ownerid = res.data
|
|
|
+ },
|
|
|
+ async uploadSuccess(){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "system.attachment.Attachment",
|
|
|
+ "method": "queryFileLink",
|
|
|
+ "content": {
|
|
|
+ "ownertable": 'sa_quotedprice',
|
|
|
+ "ownerid": this.ownerid,
|
|
|
+ "usetype":""
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$refs.uploadRef.listFile = res.data.map(item=>{
|
|
|
+ return {
|
|
|
+ "name":item.document,
|
|
|
+ "url":item.url
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ })
|
|
|
+ this.loading = false
|
|
|
+ },
|
|
|
+ quotedpriceamountChange(data){
|
|
|
+ this.form.quotedpriceamount = Math.round(data * 100)/100
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
if (this.drawerShow){this.drawer = true}
|
|
@@ -599,6 +641,7 @@ export default {
|
|
|
this.form.billdate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
|
|
|
this.form.sa_quotedpriceid = 0
|
|
|
this.queryItemType()
|
|
|
+ this.queryID()
|
|
|
},
|
|
|
created() {
|
|
|
|