新增备注

This commit is contained in:
weipengfei 2023-09-15 14:37:22 +08:00
parent 438f9043eb
commit fb21725734
4 changed files with 69 additions and 3 deletions

View File

@ -43,4 +43,9 @@ export function apiShopSendMsgApi(params: any) {
//请求证据包下载地址
export function contractEvidence(params: any) {
return request.get({ url: "/shop_contract/evidence", params });
}
// 设置备注
export function apiShopContractAddNotes(params: any) {
return request.post({ url: '/shop_contract/addNote', params })
}

View File

@ -557,7 +557,7 @@ const handleAvatarSuccess_four: UploadProps["onSuccess"] = (
const router = useRouter();
const submitContract = () => {
if (!formData.file) ElMessage.error("请先上传合同!");
if (!formData.file) return ElMessage.error("请先上传合同!");
upContact({ file: formData.file, id: route.query.id });
removeTab();
router.back();

View File

@ -361,6 +361,10 @@
placeholder="商户入驻合同"
/>
</el-form-item>
<br />
<el-form-item label="备注">
<el-input v-model="formData.notes" :readonly="true" type="textarea" />
</el-form-item>
<!-- <el-form-item label="合同编号" prop="contract_no">
<el-input
v-model="formData.party_b_name"
@ -467,6 +471,7 @@ const formData = reactive({
url: "",
status_name: "",
signed_contract_url: "",
notes: "",
});
const fileList = ref<UploadUserFile[]>([]);
const basicdata = ref({});
@ -558,7 +563,7 @@ const handleAvatarSuccess_four: UploadProps["onSuccess"] = (
const router = useRouter();
const submitContract = () => {
if (!formData.file) ElMessage.error("请先上传合同!");
if (!formData.file) return ElMessage.error("请先上传合同!");
apiShopWindControl({ file: formData.file, id: route.query.id });
removeTab();
router.back();

View File

@ -110,8 +110,10 @@
<span v-else style="color: #fe0000">未签约</span>
</template>
</el-table-column>
<el-table-column label="备注" prop="notes" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="220" fixed="right">
<el-table-column label="操作" width="280" fixed="right">
<template #default="{ row }">
<el-button
type="primary"
@ -126,6 +128,14 @@
>{{ row.status ? "详情" : "审核" }}</router-link
>
</el-button>
<el-button
type="primary"
v-perms="['shop_contract/details']"
link
@click="addNotes(row)"
>
设置备注
</el-button>
<template v-if="row.status == 0">
<el-button
v-perms="['shop_contract/details']"
@ -220,6 +230,19 @@
<el-button type="info" size="large" @click="offPop">返回</el-button>
</p>
</el-dialog>
<popup
ref="notesRef"
title="设置备注"
:async="true"
width="550px"
@confirm="handleSubmit"
>
<el-form :model="formData" :rules="noteRules">
<el-form-item label="备注" prop="notes">
<el-input v-model="formData.notes" type="textarea" />
</el-form-item>
</el-form>
</popup>
</div>
</template>
@ -232,10 +255,12 @@ import {
apiShopDraftingcontracts,
apiShopSendMsgApi,
contractEvidence,
apiShopContractAddNotes,
} from "@/api/shop_contract";
import { timeFormat } from "@/utils/util";
import feedback from "@/utils/feedback";
import EditPopup from "./edit.vue";
import Popup from "@/components/popup/index.vue";
const statusdata = reactive([
{ id: "1", name: "已签约" },
@ -246,6 +271,37 @@ const editRef = shallowRef<InstanceType<typeof EditPopup>>();
//
const showEdit = ref(false);
//
const formData = ref({
id: "",
notes: "",
});
const noteRules = reactive({
notes: [
{
required: true,
message: "请输入备注",
trigger: ["blur"],
},
],
});
const notesRef = shallowRef();
const addNotes = (row: any) => {
let arr = Object.keys(formData.value);
arr.forEach((key: any) => {
formData.value[key] = row[key];
});
notesRef.value.open();
};
const handleSubmit = async () => {
await apiShopContractAddNotes({ ...formData.value });
getLists();
notesRef.value.close();
};
const handleClose = () => {
notesRef.value.close();
};
//
const queryParams = reactive({
contract_no: "",