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

页面修改

parent baa64377
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
/deep/ .q-field__prepend { /deep/ .q-field__prepend {
padding-right: 0px !important; padding-right: 0px !important;
} }
</style> </style>
<template> <template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale"> <q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale">
...@@ -91,7 +90,35 @@ ...@@ -91,7 +90,35 @@
<div class="row wrap"> <div class="row wrap">
<div class="col-12"> <div class="col-12">
<q-select stack-label color="primary" filled label="类型" option-value="Id" option-label="Name" <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>
</div> </div>
<template v-if="isShowTel"> <template v-if="isShowTel">
...@@ -120,6 +147,9 @@ ...@@ -120,6 +147,9 @@
</q-dialog> </q-dialog>
</template> </template>
<script> <script>
import {
UploadSelfFile
} from '../../api/common/common'
import { import {
saveCustomerCategory, saveCustomerCategory,
queryCustomerCategory, queryCustomerCategory,
...@@ -141,12 +171,19 @@ ...@@ -141,12 +171,19 @@
CatetoryType: '', CatetoryType: '',
CategoryId: 0, CategoryId: 0,
linkMan: "", linkMan: "",
linkTel: "" linkTel: "",
IsContract: 0, //是否签约
ContractUrl: "", //合同信息
}, },
uploadMultple: true,
typeList: [], //类型 typeList: [], //类型
saveCustomLoading: false, saveCustomLoading: false,
optionTitle: '', optionTitle: '',
isShowTel: true isShowTel: true,
fileObj: {
FileName: '',
FileUrl: ''
}
} }
}, },
created() {}, created() {},
...@@ -168,6 +205,8 @@ ...@@ -168,6 +205,8 @@
this.objOption.CategoryName = tempData.CategoryName; this.objOption.CategoryName = tempData.CategoryName;
this.objOption.CatetoryType = tempData.CatetoryType; this.objOption.CatetoryType = tempData.CatetoryType;
this.objOption.CategoryId = tempData.CategoryId; this.objOption.CategoryId = tempData.CategoryId;
this.objOption.IsContract = tempData.IsContract;
this.objOption.ContractUrl = tempData.ContractUrl;
} }
}) })
this.optionTitle = "修改客户信息" this.optionTitle = "修改客户信息"
...@@ -177,6 +216,8 @@ ...@@ -177,6 +216,8 @@
this.objOption.CategoryId = 0; this.objOption.CategoryId = 0;
this.objOption.linkMan = ''; this.objOption.linkMan = '';
this.objOption.linkTel = ''; this.objOption.linkTel = '';
this.objOption.IsContract = 0;
this.objOption.ContractUrl = '';
this.optionTitle = "新增客户信息" this.optionTitle = "新增客户信息"
this.isShowTel = true; this.isShowTel = true;
} }
...@@ -185,7 +226,7 @@ ...@@ -185,7 +226,7 @@
saveCourse() { saveCourse() {
this.$refs.CategoryName.validate(); this.$refs.CategoryName.validate();
this.$refs.CatetoryType.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 => { saveCustomerCategory(this.objOption).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
...@@ -212,8 +253,17 @@ ...@@ -212,8 +253,17 @@
closeCourseForm() { closeCourseForm() {
this.$emit('close'); this.$emit('close');
this.persistent = false; 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 @@ ...@@ -7,7 +7,6 @@
cursor: pointer; cursor: pointer;
color: var(--q-color-primary); color: var(--q-color-primary);
} }
</style> </style>
<template> <template>
<div class="b2bcustomlist"> <div class="b2bcustomlist">
...@@ -25,6 +24,12 @@ ...@@ -25,6 +24,12 @@
<q-td> <q-td>
<div class="CustomerName" @click="showDetail(props.row)"> <div class="CustomerName" @click="showDetail(props.row)">
{{ props.row.CategoryName }} {{ 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> </div>
</q-td> </q-td>
</template> </template>
...@@ -248,12 +253,11 @@ ...@@ -248,12 +253,11 @@
//创建者为本人或者有权限 才能修改 //创建者为本人或者有权限 才能修改
if (UserInfo.Id === row.CreateBy || isHavePer) { if (UserInfo.Id === row.CreateBy || isHavePer) {
this.isCanEdit = true; this.isCanEdit = true;
}else{ } else {
this.isCanEdit = false; this.isCanEdit = false;
} }
this.isShowDetailForm = true; 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