Commit 032c2be0 authored by qinj's avatar qinj

debug

parent 16b5bea2
......@@ -10,8 +10,8 @@
:sections="sections"
/>
<div class="btn">
<el-button type="primary" @click="dialogFormVisible = true">审批</el-button>
<el-button type="" @click="dialogFormVisible = true">退回</el-button>
<el-button type="primary" @click="approve">审批</el-button>
<el-button type="" @click="reject">退回</el-button>
</div>
<el-dialog title="审批意见" :visible.sync="dialogFormVisible">
<el-form :model="form">
......@@ -20,8 +20,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="approveClick(0)">取 消</el-button>
<el-button type="primary" @click="approveClick(1)">确 定</el-button>
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="approveClick">确 定</el-button>
</div>
</el-dialog>
</div>
......@@ -50,6 +50,7 @@ export default {
addBtnStart: false,
objectId: '',
id:'',
status:0,
formData: {},
province: [],
sections: [
......@@ -279,22 +280,7 @@ export default {
label: '覆盖范围(城市)',
layout: 12,
isOptions: true,
optionsLinkageFields: ['ExtProvince_SDK', 'ExtCity_SDK'],
options: async data => {
if (!data.ExtCity_SDK) {
return []
}
const res = await districtSearch({
cityCode: data.ExtCity_SDK
})
var result = res.results.map(item => {
return {
text: item.Name,
value: item.Code
}
})
return result
},
options: []
},
}
......@@ -356,10 +342,34 @@ export default {
handleSuccess () {
// this.$message.success('创建成功')
},
approve(){
this.dialogFormVisible=true
this.status=1
},
reject(){
this.dialogFormVisible=true
this.status=2
},
approveClick(){
ProcessApproval(this.formData).then((resp)=>{
const cc={extProcessNode_SDK:this.formData.ExtProcessNode_SDK,
extCustomerType_SDK:this.formData.ExtCustomerType_SDK,
extProvince_SDK:this.formData.ExtProvince_SDK,
objectID:this.formData.ObjectID,
extLockRsp_SDK:this.formData.extLockRsp_SDK,
extLockCity_SDK:this.formData.ExtLockCity_SDK,
extChannelType_SDK:this.formData.ExtChannelType_SDK}
if(this.status==1){
const add={customerDTO:cc,note:this.form.note,result:"approve"}
ProcessApproval(add).then((resp)=>{
this.$message.success("审批成功!")
})
}else{
const bdd={customerDTO:cc,note:this.form.note,result:"reject"}
ProcessApproval(bdd).then((resp)=>{
this.$message.success("退回成功!")
})
}
},
// 对象格式转化为键值对
paramsToFormData(obj) {
......
......@@ -438,7 +438,8 @@ export default {
this.loading=true
this.$request(Customer.searchUrl,this.paramsToFormData(this.formData)).then((resp) => {
this.loading=false
if(resp.state){
console.log(resp)
if(resp.results.length<40){
this.$message.success('提交成功!')
this.$router.back()
}else{
......
......@@ -418,7 +418,7 @@ export default {
bOptions:[],
cOptions:[],
supplierBaseRules: {
Name: [{ required: true, message: '请选择公司名称', trigger: ['change', 'blur'] }],
Name: [{ required: true, message: '请选择公司名称', trigger: ['blur'] }],
extSocialUnifiedCreditCode_SDK: [{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }],
extRegisteredCapital_SDK: [{ required: true, message: '请输入注册资本(万元)', trigger: 'blur' }],
extCorporateName_SDK: [{ required: true, message: '请输入法人', trigger: 'blur' }],
......@@ -530,7 +530,7 @@ export default {
this.loading=true
this.$request(Customer.searchUrl,this.paramsToFormData(this.formData)).then((resp) => {
this.loading=false
if(resp.state){
if(resp.results.length<40){
this.$message.success('提交成功!')
this.handleClickGoBack()
}else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment