Commit 4875a18c authored by 黄奎's avatar 黄奎

页面修改

parent baa64377
......@@ -73,7 +73,6 @@
/deep/ .q-field__prepend {
padding-right: 0px !important;
}
</style>
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale">
......@@ -91,7 +90,35 @@
<div class="row wrap">
<div class="col-12">
<q-select stack-label color="primary" filled label="类型" option-value="Id" option-label="Name"
ref="CatetoryType" :options="typeList" class="q-pb-lg" v-model="objOption.CatetoryType" :rules="[val => !!val || '请选择类型']" emit-value map-options />
ref="CatetoryType" :options="typeList" class="q-pb-lg" v-model="objOption.CatetoryType"
:rules="[val => !!val || '请选择类型']" emit-value map-options />
</div>
</div>
<div class="row wrap">
<div class="col-12">
<q-field filled label="签约状态" stack-label>
<template v-slot:control>
<q-radio dense v-model="objOption.IsContract" :val="0" label="未签约" size="xs" />
&nbsp;&nbsp;
<q-radio dense v-model="objOption.IsContract" :val="1" label="已签约" size="xs" />
</template>
</q-field>
</div>
</div>
<div class="row wrap" style="margin-top:20px;">
<div class="col-12">
<template v-if="objOption.IsContract==1">
<el-upload class="upload-demo" action="" :show-file-list="false" :http-request="UploadAttachment"
:multiple="uploadMultple">
<q-btn color="accent" size="sm" icon="add" label="上传同行合同" />
</el-upload>
<a v-if="objOption.ContractUrl" style="margin-left:10px;color:#2961FE;text-decoration:none;"
:href="objOption.ContractUrl" target="_blank">
<template v-if="fileObj.FileName&&fileObj.FileName!=''">
{{fileObj.FileName}}
</template>
查看合同</a>
</template>
</div>
</div>
<template v-if="isShowTel">
......@@ -120,6 +147,9 @@
</q-dialog>
</template>
<script>
import {
UploadSelfFile
} from '../../api/common/common'
import {
saveCustomerCategory,
queryCustomerCategory,
......@@ -141,12 +171,19 @@
CatetoryType: '',
CategoryId: 0,
linkMan: "",
linkTel: ""
linkTel: "",
IsContract: 0, //是否签约
ContractUrl: "", //合同信息
},
uploadMultple: true,
typeList: [], //类型
saveCustomLoading: false,
optionTitle: '',
isShowTel: true
isShowTel: true,
fileObj: {
FileName: '',
FileUrl: ''
}
}
},
created() {},
......@@ -168,6 +205,8 @@
this.objOption.CategoryName = tempData.CategoryName;
this.objOption.CatetoryType = tempData.CatetoryType;
this.objOption.CategoryId = tempData.CategoryId;
this.objOption.IsContract = tempData.IsContract;
this.objOption.ContractUrl = tempData.ContractUrl;
}
})
this.optionTitle = "修改客户信息"
......@@ -177,6 +216,8 @@
this.objOption.CategoryId = 0;
this.objOption.linkMan = '';
this.objOption.linkTel = '';
this.objOption.IsContract = 0;
this.objOption.ContractUrl = '';
this.optionTitle = "新增客户信息"
this.isShowTel = true;
}
......@@ -185,7 +226,7 @@
saveCourse() {
this.$refs.CategoryName.validate();
this.$refs.CatetoryType.validate();
if (!this.$refs.CategoryName.hasError&&!this.$refs.CatetoryType.hasError) {
if (!this.$refs.CategoryName.hasError && !this.$refs.CatetoryType.hasError) {
saveCustomerCategory(this.objOption).then(res => {
if (res.Code == 1) {
this.$q.notify({
......@@ -212,8 +253,17 @@
closeCourseForm() {
this.$emit('close');
this.persistent = false;
}
},
//上传附件
UploadAttachment(files) {
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.fileObj.FileName = res.FileName;
this.fileObj.FileUrl = res.FileUrl;
this.objOption.ContractUrl = res.FileUrl;
}
})
},
},
}
</script>
</script>
\ No newline at end of file
......@@ -7,7 +7,6 @@
cursor: pointer;
color: var(--q-color-primary);
}
</style>
<template>
<div class="b2bcustomlist">
......@@ -25,6 +24,12 @@
<q-td>
<div class="CustomerName" @click="showDetail(props.row)">
{{ props.row.CategoryName }}
<template v-if="props.row.IsContract==1">
<span style="color:green;">(已签约)</span>
</template>
<template v-if="props.row.IsContract==0">
<span style="color:red;">(未签约)</span>
</template>
</div>
</q-td>
</template>
......@@ -248,12 +253,11 @@
//创建者为本人或者有权限 才能修改
if (UserInfo.Id === row.CreateBy || isHavePer) {
this.isCanEdit = true;
}else{
} else {
this.isCanEdit = false;
}
this.isShowDetailForm = true;
}
}
};
</script>
</script>
\ No newline at end of file
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