This commit is contained in:
2026-10-08 18:19:39 +08:00
parent 25b8d0104f
commit 75527ae81d
425 changed files with 53925 additions and 2645 deletions
@@ -0,0 +1,119 @@
<template>
<div>
<el-table :data="list" style="width: 100%">
<el-table-column prop="user.company.companyName" label="企业"/>
<el-table-column prop="desc" label="产品描述"/>
<el-table-column prop="amount" label="报价"/>
<el-table-column label="附件">
<template v-slot="{ row }">
<p v-for="(item, index) in row.files" :key="index">
<a :href="item" target="_blank">预览:文件{{ index + 1 }}</a>
</p>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注"/>
<el-table-column label="状态">
<template v-slot="{ row }">
<span v-if="row.status === 0">待选商</span>
<span v-if="row.status === 1">已选</span>
</template>
</el-table-column>
<el-table-column label="操作">
<template v-slot="{ row }">
<el-button type="primary" size="small" v-if="info.status === 1" @click="edit(row)" plain>编辑</el-button>
<el-button type="primary" size="small" v-if="info.status === 1" :disabled="!row.amount" @click="confirm(row._id)">选商
</el-button>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 2rem; text-align: center">
<el-button plain @click.native="cancel">关闭</el-button>
</div>
<el-dialog title="编辑报价" :visible.sync="dialogVisible" width="50%" append-to-body>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="报价">
<el-input v-model="form.amount" placeholder="请输入报价"/>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" placeholder="请输入备注"/>
</el-form-item>
<el-form-item label="附件">
<vk-data-upload accept="*" list-type="text" v-model="form.files"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="doEdit">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: "SelectQuote",
props: {
info: {
type: Object
}
},
data() {
return {
list: [],
clickedInfo: null,
dialogVisible: null,
form: {
_id: null,
amount: null,
remark: null,
files: [],
}
}
},
methods: {
async getList() {
const {rows} = await vk.callFunction({
url: 'admin/selfProduct/quote/sys/getQuoteList',
data: {pageSize: 500, quoteId: this.info._id}
})
this.list = rows
},
cancel() {
this.$emit('cancel')
},
async confirm(quoteId) {
await vk.callFunction({
url: 'admin/selfProduct/quote/sys/confirmQuote',
data: {
quoteId,
sheetId: this.info._id
}
})
this.cancel()
},
edit(info) {
this.form = {
_id: info._id,
amount: info.amount,
remark: info.remark,
files: info.files ?? []
}
this.dialogVisible = true
},
doEdit(){
vk.callFunction({
url: 'admin/selfProduct/quote/sys/editQuote',
data: this.form
}).then(() => {
this.dialogVisible = false
this.getList()
})
}
},
mounted() {
this.getList()
}
}
</script>
@@ -0,0 +1,68 @@
<template>
<div>
<p>公司选择:</p>
<el-select v-model="selectedList" placeholder="点击选择报价公司" style="margin-top: 1rem; width: 90%" multiple clearable filterable>
<el-option
v-for="(item, index) in companyList"
:key="item.value"
:label="item.nickname"
:value="item._id">
</el-option>
</el-select>
<p style="margin-top: 2rem;">产品描述:</p>
<el-input type="textarea" v-model="desc" placeholder="请输入" style="margin-top: 1rem; width: 90%"></el-input>
<div style="margin-top: 2rem; text-align: center">
<el-button plain @click.native="cancel">取消</el-button>
<el-button type="primary" :disabled="selectedList.length === 0" @click.native="confirm">确定</el-button>
</div>
</div>
</template>
<script>
export default {
name: "SetEnquiry",
props: {
info: {
type: Object
}
},
data() {
return {
selectedList: [],
companyList: [],
desc: ''
}
},
methods: {
async getCompanyList() {
const {rows} = await vk.callFunction({
url: 'admin/system/user/sys/getList',
data: {type: 2, pageSize: 500}
// data: {pageSize: 500}
})
// this.companyList = rows.filter(item => item.company && item.company.companyName !== '' && item.company.companyName)
this.companyList = rows
},
cancel(){
this.$emit('cancel')
},
async confirm(){
await vk.callFunction({
url: 'admin/selfProduct/quote/sys/setCompany',
data: {
list: this.selectedList,
quoteId: this.info._id,
desc: this.desc,
}
})
this.cancel()
}
},
mounted() {
this.desc = this.info.desc
this.getCompanyList()
}
}
</script>