|
@@ -263,9 +263,17 @@
|
|
|
<el-radio label="扫描件" :style="{marginTop:windowWidth>1314?0:'10px'}">{{$t(`扫描件`)}}</el-radio>
|
|
<el-radio label="扫描件" :style="{marginTop:windowWidth>1314?0:'10px'}">{{$t(`扫描件`)}}</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="margin-left:20px">
|
|
|
|
|
|
|
+ <div class="inline-16" v-if="tool.checkAuth($route.name,'relatedProject') && data.type == '标准订单'">
|
|
|
|
|
+ <div :style="{marginTop:projectError?'20px':''}">
|
|
|
|
|
+ <small class="inline-16"><span style="color:red;">*</span><b>{{$t(`关联项目`)}}:</b> </small>
|
|
|
|
|
+ <popoverTemp class="inline-16" :tablecols="tablecols" :isButton="false" :params="paramsProject" :isRest="true"
|
|
|
|
|
+ placeholder="选择关联项目" @rowClick="rowClick" :inputData="projectname"></popoverTemp>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="projectError" style="color:red;font-size: 12px;margin-left: 90px;">{{projectError}}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="inline-16">
|
|
|
<small><b>{{$t(`销售类别`)}}:</b> </small>
|
|
<small><b>{{$t(`销售类别`)}}:</b> </small>
|
|
|
- <el-select v-model="saletype" size="small" :placeholder="$t('请选择')" :style="{marginTop:windowWidth>1514?0:'10px'}">
|
|
|
|
|
|
|
+ <el-select class="inline-16" v-model="saletype" size="small" :placeholder="$t('请选择')" :style="{marginTop:windowWidth>1514?0:'10px'}">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in saleroptions"
|
|
v-for="item in saleroptions"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -274,7 +282,7 @@
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="margin-left:20px">
|
|
|
|
|
|
|
+ <div class="inline-16">
|
|
|
<small><b>{{$t(`单据日期`)}}:</b> </small>
|
|
<small><b>{{$t(`单据日期`)}}:</b> </small>
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
:style="{marginTop:windowWidth>1514?0:'10px'}"
|
|
:style="{marginTop:windowWidth>1514?0:'10px'}"
|
|
@@ -285,7 +293,7 @@
|
|
|
:placeholder="$t('选择日期')">
|
|
:placeholder="$t('选择日期')">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="margin-left:20px" v-if="siteId=='HY' && (data.type =='标准订单' || data.type =='项目订单')">
|
|
|
|
|
|
|
+ <div class="inline-16" v-if="siteId=='HY' && (data.type =='标准订单' || data.type =='项目订单')">
|
|
|
<small><b>{{$t(`是否样品订单`)}}:</b> </small>
|
|
<small><b>{{$t(`是否样品订单`)}}:</b> </small>
|
|
|
<el-radio-group v-model="data.typemx">
|
|
<el-radio-group v-model="data.typemx">
|
|
|
<el-radio label="样品">{{$t('是')}}</el-radio>
|
|
<el-radio label="样品">{{$t('是')}}</el-radio>
|
|
@@ -294,8 +302,12 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="normal-margin">
|
|
<div class="normal-margin">
|
|
|
- <p class="normal-title mt-10 inline-16">{{$t(`订单备注`)}}</p>
|
|
|
|
|
- <el-input size="mini" class="order__note__input" type="textarea" v-model="defaultData.remarks" :autosize="{minRows:5}" :placeholder="$t(`请输入订单备注`)"></el-input>
|
|
|
|
|
|
|
+ <p class="normal-title mt-10 inline-16">{{$t(`对外备注`)}}</p>
|
|
|
|
|
+ <el-input size="mini" class="order__note__input" type="textarea" v-model="defaultData.remarks" :autosize="{minRows:5}" :placeholder="$t(`请输入对外备注`)"></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="normal-margin">
|
|
|
|
|
+ <p class="normal-title mt-10 inline-16">{{$t(`对内备注`)}}</p>
|
|
|
|
|
+ <el-input size="mini" class="order__note__input" type="textarea" v-model="defaultData.remarks_in" :autosize="{minRows:5}" :placeholder="$t(`请输入对内备注`)"></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="normal-margin" v-if="data.type === '标准订单' || data.type === '特殊订单'">
|
|
<div class="normal-margin" v-if="data.type === '标准订单' || data.type === '特殊订单'">
|
|
|
<p class="normal-title mt-10 inline-16">{{$t(`项目备注`)}}</p>
|
|
<p class="normal-title mt-10 inline-16">{{$t(`项目备注`)}}</p>
|
|
@@ -401,7 +413,8 @@ export default {
|
|
|
accountclass:{},
|
|
accountclass:{},
|
|
|
account_index:0,
|
|
account_index:0,
|
|
|
remarks:this.data.remarks,
|
|
remarks:this.data.remarks,
|
|
|
- freightstatus:''
|
|
|
|
|
|
|
+ freightstatus:'',
|
|
|
|
|
+ remarks_in:''
|
|
|
},
|
|
},
|
|
|
total:0,
|
|
total:0,
|
|
|
setcol:24,
|
|
setcol:24,
|
|
@@ -438,6 +451,21 @@ export default {
|
|
|
addresstotal:0,
|
|
addresstotal:0,
|
|
|
enterpriseTotal:0,
|
|
enterpriseTotal:0,
|
|
|
windowWidth: document.documentElement.clientWidth, //实时屏幕宽度
|
|
windowWidth: document.documentElement.clientWidth, //实时屏幕宽度
|
|
|
|
|
+ tablecols:'',
|
|
|
|
|
+ paramsProject:{
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sys_enterpriseid": '',
|
|
|
|
|
+ "pageNumber": 1,
|
|
|
|
|
+ "pageSize": 100,
|
|
|
|
|
+ "where": {
|
|
|
|
|
+ "condition": ""
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "id": 2026011416113702,
|
|
|
|
|
+ },
|
|
|
|
|
+ projectname:'',
|
|
|
|
|
+ sa_projectid:'',
|
|
|
|
|
+ projectError:''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted () {
|
|
mounted () {
|
|
@@ -454,6 +482,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
|
this.queryBasicInfo()
|
|
this.queryBasicInfo()
|
|
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name)['projectSelectTable'].tablecols
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
|
enterprisePageChange (n) {
|
|
enterprisePageChange (n) {
|
|
@@ -536,6 +565,10 @@ export default {
|
|
|
|
|
|
|
|
// 设置默认信息
|
|
// 设置默认信息
|
|
|
async setDefaultData () {
|
|
async setDefaultData () {
|
|
|
|
|
+ this.projectError = ''
|
|
|
|
|
+ this.paramsProject.content.sys_enterpriseid = this.data.sys_enterpriseid
|
|
|
|
|
+ this.sa_projectid = ''
|
|
|
|
|
+ this.projectname = ''
|
|
|
this.defaultData.freightstatus = this.data.freightstatus
|
|
this.defaultData.freightstatus = this.data.freightstatus
|
|
|
this.defaultData.rebatebalance = this.data.rebatebalance
|
|
this.defaultData.rebatebalance = this.data.rebatebalance
|
|
|
this.defaultData.finance = this.data.finance
|
|
this.defaultData.finance = this.data.finance
|
|
@@ -548,46 +581,97 @@ export default {
|
|
|
this.saler_name = this.data.saler_name
|
|
this.saler_name = this.data.saler_name
|
|
|
this.billdate = this.data.billdate
|
|
this.billdate = this.data.billdate
|
|
|
this.selectEnterpriseInfo = this.data.contactsEnterprise
|
|
this.selectEnterpriseInfo = this.data.contactsEnterprise
|
|
|
|
|
+ this.defaultData.remarks = this.data.remarks
|
|
|
|
|
+ this.defaultData.remarks_in = this.data.remarks_in
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
async onSubmit() {
|
|
async onSubmit() {
|
|
|
- const res = await this.$api.requested({
|
|
|
|
|
- "id": 20221108111402,
|
|
|
|
|
- "content": {
|
|
|
|
|
- "sa_orderid": this.$route.query.id,
|
|
|
|
|
- "sys_enterpriseid": this.data.sys_enterpriseid, //订货企业id
|
|
|
|
|
- "sa_accountclassid": this.defaultData.accountclass.sa_accountclassid, //营销账户类型ID
|
|
|
|
|
- "sa_brandid": this.data.sa_brandid, //品牌ID
|
|
|
|
|
- "sa_contractid":this.data.sa_contractid, //合同ID,标准订单不传
|
|
|
|
|
- "sa_projectid": this.data.sa_projectid, //工程项目表ID,标准订单不传
|
|
|
|
|
- "sys_enterprise_financeid": this.defaultData.fin_info.sys_enterprise_financeid, //合作企业财务信息ID(开票信息)
|
|
|
|
|
- "sa_logiscompid": this.defaultData.logist_info.sa_logiscompid, //物流公司档案ID
|
|
|
|
|
- "rec_contactsid": this.defaultData.re_info.contactsid, //合作企业联系人表ID(收货信息)
|
|
|
|
|
- "type": this.data.type, //订单类型
|
|
|
|
|
- "typemx":this.data.typemx, //明细分类,可选
|
|
|
|
|
- "remarks": this.defaultData.remarks, //可选
|
|
|
|
|
- "saler_hrid":this.data.saler_hrid,//销售人员hrid,业务员hrid
|
|
|
|
|
- "signbackstatus":this.signbackstatus,
|
|
|
|
|
- "tradefieldmx":this.data.tradefieldmx,
|
|
|
|
|
- "pay_enterpriseid":this.data.pay_enterpriseid,
|
|
|
|
|
- "tradefield":this.data.tradefield,
|
|
|
|
|
- "saletype":this.saletype,
|
|
|
|
|
- "rebate_used":this.checked,//默认0,是否使用返利金
|
|
|
|
|
- "signbacknum":'',
|
|
|
|
|
- "sa_promotionid":this.data.sa_promotionid,
|
|
|
|
|
- "billdate":this.billdate,
|
|
|
|
|
- "projectnote":this.data.projectnote,
|
|
|
|
|
- "freightstatus":this.defaultData.freightstatus
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
|
|
- this.$emit('onSuccess')
|
|
|
|
|
- /*if (this.data.type === '标准订单' || this.data.type === '特殊订单') {
|
|
|
|
|
- this.isusedrebate === 1?this.useRebate(this.data.rebateamount):""
|
|
|
|
|
- }*/
|
|
|
|
|
|
|
+ console.log(this.data.type,this.sa_projectid)
|
|
|
|
|
+ if (this.sa_projectid == '' && this.tool.checkAuth(this.$route.name,'relatedProject') && this.data.type == '标准订单'){
|
|
|
|
|
+ this.projectError = '请选择关联项目'
|
|
|
|
|
+ }else {
|
|
|
|
|
+ if (this.data.type == '标准订单'){
|
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
|
+ "id": 20221108111402,
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sa_orderid": this.$route.query.id,
|
|
|
|
|
+ "sys_enterpriseid": this.data.sys_enterpriseid, //订货企业id
|
|
|
|
|
+ "sa_accountclassid": this.defaultData.accountclass.sa_accountclassid, //营销账户类型ID
|
|
|
|
|
+ "sa_brandid": this.data.sa_brandid, //品牌ID
|
|
|
|
|
+ "sa_contractid":this.data.sa_contractid, //合同ID,标准订单不传
|
|
|
|
|
+ "sys_enterprise_financeid": this.defaultData.fin_info.sys_enterprise_financeid, //合作企业财务信息ID(开票信息)
|
|
|
|
|
+ "sa_logiscompid": this.defaultData.logist_info.sa_logiscompid, //物流公司档案ID
|
|
|
|
|
+ "rec_contactsid": this.defaultData.re_info.contactsid, //合作企业联系人表ID(收货信息)
|
|
|
|
|
+ "type": this.data.type, //订单类型
|
|
|
|
|
+ "typemx":this.data.typemx, //明细分类,可选
|
|
|
|
|
+ "remarks": this.defaultData.remarks, //可选
|
|
|
|
|
+ "saler_hrid":this.data.saler_hrid,//销售人员hrid,业务员hrid
|
|
|
|
|
+ "signbackstatus":this.signbackstatus,
|
|
|
|
|
+ "tradefieldmx":this.data.tradefieldmx,
|
|
|
|
|
+ "pay_enterpriseid":this.data.pay_enterpriseid,
|
|
|
|
|
+ "tradefield":this.data.tradefield,
|
|
|
|
|
+ "saletype":this.saletype,
|
|
|
|
|
+ "rebate_used":this.checked,//默认0,是否使用返利金
|
|
|
|
|
+ "signbacknum":'',
|
|
|
|
|
+ "sa_promotionid":this.data.sa_promotionid,
|
|
|
|
|
+ "billdate":this.billdate,
|
|
|
|
|
+ "projectnote":this.data.projectnote,
|
|
|
|
|
+ "freightstatus":this.defaultData.freightstatus,
|
|
|
|
|
+ "sa_projectid":this.sa_projectid,
|
|
|
|
|
+ "remarks_in":this.defaultData.remarks_in
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
|
|
+ this.$emit('onSuccess')
|
|
|
|
|
+ /*if (this.data.type === '标准订单' || this.data.type === '特殊订单') {
|
|
|
|
|
+ this.isusedrebate === 1?this.useRebate(this.data.rebateamount):""
|
|
|
|
|
+ }*/
|
|
|
|
|
+
|
|
|
|
|
+ this.drawer = false
|
|
|
|
|
+ })
|
|
|
|
|
+ }else {
|
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
|
+ "id": 20221108111402,
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sa_orderid": this.$route.query.id,
|
|
|
|
|
+ "sys_enterpriseid": this.data.sys_enterpriseid, //订货企业id
|
|
|
|
|
+ "sa_accountclassid": this.defaultData.accountclass.sa_accountclassid, //营销账户类型ID
|
|
|
|
|
+ "sa_brandid": this.data.sa_brandid, //品牌ID
|
|
|
|
|
+ "sa_contractid":this.data.sa_contractid, //合同ID,标准订单不传
|
|
|
|
|
+ "sa_projectid": this.data.sa_projectid, //工程项目表ID,标准订单不传
|
|
|
|
|
+ "sys_enterprise_financeid": this.defaultData.fin_info.sys_enterprise_financeid, //合作企业财务信息ID(开票信息)
|
|
|
|
|
+ "sa_logiscompid": this.defaultData.logist_info.sa_logiscompid, //物流公司档案ID
|
|
|
|
|
+ "rec_contactsid": this.defaultData.re_info.contactsid, //合作企业联系人表ID(收货信息)
|
|
|
|
|
+ "type": this.data.type, //订单类型
|
|
|
|
|
+ "typemx":this.data.typemx, //明细分类,可选
|
|
|
|
|
+ "remarks": this.defaultData.remarks, //可选
|
|
|
|
|
+ "saler_hrid":this.data.saler_hrid,//销售人员hrid,业务员hrid
|
|
|
|
|
+ "signbackstatus":this.signbackstatus,
|
|
|
|
|
+ "tradefieldmx":this.data.tradefieldmx,
|
|
|
|
|
+ "pay_enterpriseid":this.data.pay_enterpriseid,
|
|
|
|
|
+ "tradefield":this.data.tradefield,
|
|
|
|
|
+ "saletype":this.saletype,
|
|
|
|
|
+ "rebate_used":this.checked,//默认0,是否使用返利金
|
|
|
|
|
+ "signbacknum":'',
|
|
|
|
|
+ "sa_promotionid":this.data.sa_promotionid,
|
|
|
|
|
+ "billdate":this.billdate,
|
|
|
|
|
+ "projectnote":this.data.projectnote,
|
|
|
|
|
+ "freightstatus":this.defaultData.freightstatus,
|
|
|
|
|
+ "remarks_in":this.defaultData.remarks_in
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
|
|
+ this.$emit('onSuccess')
|
|
|
|
|
+ /*if (this.data.type === '标准订单' || this.data.type === '特殊订单') {
|
|
|
|
|
+ this.isusedrebate === 1?this.useRebate(this.data.rebateamount):""
|
|
|
|
|
+ }*/
|
|
|
|
|
+
|
|
|
|
|
+ this.drawer = false
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- this.drawer = false
|
|
|
|
|
- })
|
|
|
|
|
},
|
|
},
|
|
|
onEditSuccess () {
|
|
onEditSuccess () {
|
|
|
// this.$refs.addpro.listData()
|
|
// this.$refs.addpro.listData()
|
|
@@ -661,6 +745,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
})
|
|
})
|
|
|
this.$refs['saler'].visible = false
|
|
this.$refs['saler'].visible = false
|
|
|
|
|
+ },
|
|
|
|
|
+ rowClick(val){
|
|
|
|
|
+ this.projectname = val.projectname
|
|
|
|
|
+ this.sa_projectid = val.sa_projectid
|
|
|
|
|
+ this.projectError = ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|