mobile quot

This commit is contained in:
JIAL 2024-06-19 13:52:58 +08:00
parent a6d884454b
commit d92b4f597d
5 changed files with 200 additions and 138 deletions

View File

@ -1,13 +1,5 @@
#for tests only !
<<<<<<< HEAD
#Fri Jun 14 14:56:10 CST 2024
=======
<<<<<<< HEAD
#Fri Jun 14 15:11:13 CST 2024
=======
#Fri Jun 14 11:47:35 CST 2024
>>>>>>> 4f24577e27615af0f5c59b77a49deac1fa915200
>>>>>>> 2d988a2a6ab5b02b0e5a1fb532fbbe9a4506090c
#Wed Jun 19 09:11:03 CST 2024
jco.destination.pool_capacity=10
jco.client.lang=ZH
jco.client.ashost=172.19.0.125
@ -15,14 +7,5 @@ jco.client.saprouter=
jco.client.user=RFC
jco.client.sysnr=00
jco.destination.peak_limit=10
<<<<<<< HEAD
jco.client.passwd=w#5?5KrYAXJkIlK$jo-`m}bwas!6.[bT!=Xmo.]-;Q#6*HV+
jco.client.passwd=g}=[!8cY+]^Y:h6_:E9``X=J#eA[=IM/|(0EB`M)]I1i?/qD
jco.client.client=800
=======
<<<<<<< HEAD
jco.client.passwd=654321
=======
jco.client.passwd=fIM!UgIY[[%*5IWWy6w`}PO$6)+{K)R`9,$_P^3ve}26(Qf|
>>>>>>> 4f24577e27615af0f5c59b77a49deac1fa915200
jco.client.client=300
>>>>>>> 2d988a2a6ab5b02b0e5a1fb532fbbe9a4506090c

View File

@ -60,6 +60,7 @@
"vue": "2.6.12",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-infinite-scroll": "^2.0.2",
"vue-meta": "2.4.0",
"vue-qrcode-reader": "^3.2.0",
"vue-router": "3.4.9",

View File

@ -140,7 +140,7 @@ export const constantRoutes = [
hidden: true,
children: [
{
path: 'edit/:quotId',
path: 'edit',
component: () => import('@/views/mobile/quoteMobile/operation/add'),
name: 'quoteMobileEdit',
meta: { title: '编辑报价单', activeMenu: '/mobile/quoteMobile/operation' }

View File

@ -2,44 +2,81 @@
<div>
<div class="search-container">
<el-input
v-model="queryParams.quotProject"
placeholder="请输入项目名称"
v-model="queryParams.quotCustomerName"
placeholder="请输入客户名称"
class="search-input"
clearable>
</el-input>
<el-select
v-model="queryParams.quotApprovalStatus"
placeholder="请选择审批状态"
class="search-input"
clearable
>
<el-option
v-for="dict in dict.type.quot_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<el-input
v-model="queryParams.quotProject"
placeholder="请输入项目名称"
class="search-input"
clearable>
<el-button slot="append" icon="el-icon-search" @click="handleSearch">搜索</el-button>
<el-button slot="append" icon="el-icon-plus" @click="handleAdd">新增</el-button>
</el-input>
</div>
<div v-if="quoteList.length === 0">内容为空</div>
<div v-for="(quote, index) in quoteList" :key="index">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{quote.quotCode}}</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="handleEdit(quote)">编辑</el-button>
<div v-for="(quote, index) in quoteList" :key="index">
<div style="padding: 10px">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{quote.quotCode}}</span>
<el-button style="float: right; padding: 3px; " type="text" @click="handleEdit(quote, 'edit')">编辑</el-button>
<el-button style="float: right; padding: 3px; margin-right: 50px " type="text" @click="handleEdit(quote, 'view')">查看</el-button>
</div>
<div class="text item">
<div v-if="false">订单号Id:{{quote.quotId}}</div>
<div style="margin-bottom: 5px">客户:{{quote.quotCustomerName}}</div>
<div style="margin-bottom: 5px">项目名称:{{quote.quotProject}}</div>
<div style="margin-bottom: 5px">提交状态:{{quote.quotApprovalStatus === '0' ? '待提交' : (quote.quotApprovalStatus === '1' ? '协助中' :
(quote.quotApprovalStatus === '2' ? '已完成' : '已驳回'))}}</div>
<div style="margin-bottom: 5px">OA审批状态:{{quote.quotOAApprovalStatus === '0' ? '待提交' : (quote.quotOAApprovalStatus === '1' ? '协助中' :
(quote.quotOAApprovalStatus === '2' ? '已完成' : '已驳回'))}}</div>
<div style="margin-bottom: 5px">询价日期:{{formatDate(quote.quotInquiryDate)}}</div>
<div style="margin-bottom: 5px">报价日期:{{formatDate(quote.quotQuotationDate)}}</div>
<div >创建时间:{{quote.createTime}}</div>
</div>
</el-card>
</div>
<div class="text item">
<div v-if="false">订单号Id:{{quote.quotId}}</div>
<div>客户:{{quote.quotCustomerName}}</div>
<div>项目名称:{{quote.quotProject}}</div>
<div>提交状态:{{quote.quotApprovalStatus === '0' ? '待提交' : (quote.quotApprovalStatus === '1' ? '协助中' :
(quote.quotApprovalStatus === '2' ? '已完成' : '已驳回'))}}</div>
<div>询价日期:{{quote.quotInquiryDate}}</div>
<div>报价日期:{{quote.quotQuotationDate}}</div>
<div>创建时间:{{quote.createTime}}</div>
</div>
</el-card>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="handleSearch"
/>
</div>
</div>
</template>
<script>
import { getQuoteList} from "@/api/mobile/quoteMobile/quoteMobile";
import { listQuot } from "@/api/quot/quot";
export default {
name: "index",
dicts: ['quot_approval_status'],
data() {
return {
loading: true,
quoteList: [],
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
@ -50,30 +87,58 @@ export default {
},
};
},
computed: {
noMore () {
return this.quoteList.length >= this.total
},
disabled () {
return this.loading || this.noMore
}
},
created() {
this.queryQuoteList();
this.handleSearch();
},
mounted() {
},
methods: {
queryQuoteList() {
getQuoteList(this.queryParams).then(response => {
this.quoteList = response.data
console.log(this.quoteList);
});
},
handleSearch() {
console.log(this.queryParams)
getQuoteList(this.queryParams).then(response => {
this.quoteList = response.data
console.log(this.quoteList);
});
try {
listQuot(this.queryParams).then(response => {
this.quoteList = response.rows;
this.queryParams.pageNum++;
this.total = response.total;
});
} catch (error) {
console.error(error);
}
},
handleAdd() {
this.$router.push('/quoteMobile/add');
},
handleEdit(quote) {
const quotId = quote.quotId
this.$router.push("/quoteMobile/edit/edit/" + quotId);
handleEdit(quote, name) {
const info = { quotId: quote.quotId, operate: name };
console.log(info);
this.$router.push({ path: '/quoteMobile/edit/edit', query: info });
console.log(quote)
},
formatDate(dateString) {
if (dateString !== undefined && dateString !== null) {
const date = new Date(dateString);
return date.toLocaleString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: false,
timeZone: 'Asia/Shanghai'
});
} else {
return ''
}
}
},
@ -82,7 +147,7 @@ export default {
<style>
.search-container {
display: flex;
padding: 5px 10px 0px 10px;
justify-content: center;
margin-bottom: 10px;
margin-top: 10px;
@ -94,5 +159,18 @@ export default {
border-radius: 25px;
}
.box-card {
margin-bottom: 0;
}
.loading,
.end-of-data {
text-align: center;
padding: 10px;
}
.quote-list {
overflow-y: auto;
height: 100vh; /* 设置高度以触发滚动 */
}
</style>

View File

@ -12,12 +12,12 @@
<el-form-item label="客户" prop="quotCustomerName">
<el-input readonly v-model="formData.quotCustomerName" placeholder="请输入客户" >
<template slot="append">
<span @click="openCustomer">选择</span>
<span @click="openCustomer">选择</span>
</template>
</el-input>
</el-form-item>
<el-form-item label="地址" prop="quotAddress">
<el-input v-model="formData.quotAddress" placeholder="请输入地址" clearable>
<el-input :readonly="isReadOnly" v-model="formData.quotAddress" placeholder="请输入地址" clearable>
</el-input>
</el-form-item>
<el-form-item label="审核人" prop="quotCheckUserNickname">
@ -25,13 +25,21 @@
></el-input>
</el-form-item>
<el-form-item label="提交状态" prop="quotApprovalStatus">
<el-input readonly v-model="formData.quotApprovalStatus" placeholder="保存后显示" clearable
<el-input readonly
:value="formData.quotApprovalStatus === undefined ? '' :(formData.quotApprovalStatus === '0' ? '待提交' :
(formData.quotApprovalStatus === '1' ? '协助中' :
(formData.quotApprovalStatus === '2' ? '已完成' : '已驳回')))"
placeholder="保存后显示" clearable
></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="quotProject">
<el-input v-model="formData.quotProject" placeholder="请输入项目名称" clearable >
</el-input>
</el-form-item>
<el-form-item label="OA审批备注" prop="quotOAApprovalStatusRemark">
<el-input readonly v-model="formData.quotOAApprovalStatusRemark" placeholder="OA审批备注" clearable >
</el-input>
</el-form-item>
<el-form-item label="报价要求" prop="quotQuotationRequire">
<el-input v-model="formData.quotQuotationRequire" placeholder="请输入报价要求" clearable
></el-input>
@ -42,97 +50,98 @@
</el-form-item>
<el-divider content-position="left" class="customer_divider_text">询价附件(先保存)</el-divider>
<el-divider content-position="left" class="customer_divider_text">清单附件(先保存再上传且必须是EXCEL文件)</el-divider>
<div v-hasPermi="['quot:quot:quotXjFile']">
<el-upload class="upload-demo"
ref="upload"
ref="quotXjFileUpload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.formData.quotId,file_type: 'quotXjFile' }"
:before-upload="beforeAvatarUploadQuotXjFile"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.formData.quotApprovalStatus == 0">
v-if="this.formData.quotApprovalStatus == '0' && !isReadOnly">
<el-button size="small" type="primary" @click="uploadFile('quotXjFile')">上传文件</el-button>
</el-upload>
</div>
<el-table class="down" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table class="down" v-loading="quotXjFileLoading" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column width="150px" label="操作">
<template slot-scope="scope">
<el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button>
<el-button :key="Math.random()" size="small" type="text" v-if="formData.quotApprovalStatus == 0">
<el-button :key="Math.random()" size="small" type="text" v-if="formData.quotApprovalStatus == '0' && !isReadOnly">
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
</el-button>
</template>
</el-table-column>
</el-table>
<el-divider content-position="left" class="customer_divider_text">技术规范要求(询价附件)</el-divider>
<div v-hasPermi="['quot:quot:quotXjFile']">
<el-divider content-position="left" class="customer_divider_text">技术附件(先保存再上传,如包含清单附件则不受理)</el-divider>
<div v-hasPermi="['quot:quot:quotJsgfFile']">
<el-upload class="upload-demo"
ref="upload"
ref="quotJsgfFileUpload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.formData.quotId,file_type: 'quotXjFile' }"
:data="{ relation_id: this.formData.quotId,file_type: 'quotJsgfFile' }"
:before-upload="beforeAvatarUploadQuotJsgfFile"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.formData.quotApprovalStatus === '0'">
<el-button size="small" type="primary" @click="uploadFile('quotXjFile')">上传文件</el-button>
v-if="this.formData.quotApprovalStatus == '0' && !isReadOnly">
<el-button size="small" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button>
</el-upload>
</div>
<el-table class="down" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table class="down" v-loading="quotJsgfFileLoading" :data="quotJsgfFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column width="150px" label="操作">
<template slot-scope="scope">
<el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button>
<el-button :key="Math.random()" size="small" type="text" v-if="formData.quotApprovalStatus == '0'">
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
<el-button :key="Math.random()" size="small" type="text" v-if="formData.quotApprovalStatus == '0' && !isReadOnly">
<a @click="deleteFile(scope.row.fileId,'quotJsgfFile')">删除</a>
</el-button>
</template>
</el-table-column>
</el-table>
<el-divider content-position="left" class="customer_divider_text">反馈附件</el-divider>
<div v-hasPermi="['quot:quot:quotXjFile']">
<div v-hasPermi="['quot:quot:quotFkFile']" >
<el-upload class="upload-demo"
ref="upload"
ref="quotFkFileUpload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.formData.quotId,file_type: 'quotXjFile' }"
:data="{ relation_id: this.formData.quotId,file_type: 'quotFkFile' }"
:before-upload="beforeAvatarUploadQuotFkFile"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.formData.quotApprovalStatus == '0'">
<el-button size="small" type="primary" @click="uploadFile('quotXjFile')">上传文件</el-button>
v-if="this.formData.quotApprovalStatus == '1'">
<el-button size="small" type="primary" @click="uploadFile('quotFkFile')">上传文件</el-button>
</el-upload>
</div>
<el-table class="down" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table class="down" v-loading="quotFkFileLoading" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称"></el-table-column>
<el-table-column width="150px" label="操作">
<template slot-scope="scope">
<el-button :key="Math.random()" size="small" type="text">
<el-button size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button>
<el-button :key="Math.random()" size="small" type="text" v-if="formData.quotApprovalStatus == '0'">
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
</el-button>
<el-button size="small" type="text" @click="deleteFile(scope.row.fileId,'quotFkFile')" v-if="formData.quotApprovalStatus == '1'">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-form-item style="margin-top: 15px">
<el-button @click="saveForm">保存</el-button>
<el-button style="margin: 0px 15px 0px 20px" type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
<el-button v-if="!isReadOnly" @click="saveForm">保存</el-button>
<el-button v-if="!isReadOnly" style="margin: 0px 15px 0px 20px" type="primary" @click="commitForm">提交</el-button>
<el-button @click="closeForm">取消</el-button>
</el-form-item>
</el-form>
<CustomerSelect :width="100 + '%'" ref="customerSelect" :open="customerOpen" @submit="submitCustomer" @cancel="customerOpen=false"></CustomerSelect>
@ -155,6 +164,7 @@ import PeopleSelect from "@/views/components/Tools/PeopleSelect/index.vue";
/** 弹窗放大、拖拽 */
import elDragDialog from "@/directive/dialog/dragDialog";
import router from '@/router';
export default {
components: {
@ -164,8 +174,7 @@ export default {
props: [],
data() {
return {
//
form: {},
isReadOnly: false,
// -
quotXjFileLoading: false,
quotXjFileList: [],
@ -198,15 +207,8 @@ export default {
quotPhone: '',
quotQuotationFrom: '',
quotPrintUserName: '',
field115: null,
field116: null,
},
rules: {
quotAddress: [{
required: true,
message: '请输入地址',
trigger: 'blur'
}],
quotProject: [{
required: true,
message: '请输入项目名称',
@ -228,49 +230,27 @@ export default {
trigger: 'blur'
}],
},
field115Action: 'https://jsonplaceholder.typicode.com/posts/',
field115fileList: [],
field116Action: 'https://jsonplaceholder.typicode.com/posts/',
field116fileList: [],
}
},
computed: {},
watch: {},
created() {
const quotId = this.$route.params && this.$route.params.quotId;
const queryParams = this.$route.query;
console.log(queryParams);
const quotId = queryParams.quotId;
const operate = queryParams.operate;
if (quotId !== undefined && quotId !== null) {
const row = {'quotId':quotId}
this.handleUpdate(row);
}
if (operate === 'view') {
this.isReadOnly = true;
}
console.log(quotId);
},
mounted() {},
methods: {
submitForm() {
this.$refs['elForm'].validate(valid => {
if (!valid) return
// TODO
})
},
resetForm() {
this.$refs['elForm'].resetFields()
},
field115BeforeUpload(file) {
let isRightSize = file.size / 1024 / 1024 < 2
if (!isRightSize) {
this.$message.error('文件大小超过 2MB')
}
return isRightSize
},
field116BeforeUpload(file) {
let isRightSize = file.size / 1024 / 1024 < 100
if (!isRightSize) {
this.$message.error('文件大小超过 100MB')
}
return isRightSize
},
//
openCustomer(){
this.customerOpen=true;
@ -295,7 +275,7 @@ export default {
this.open = true;
this.activeName = "quotInfo";
const quotJsxzGroup = this.form.quotJsxzGroupValues;
const quotJsxzGroup = this.formData.quotJsxzGroupValues;
if(quotJsxzGroup){
if(quotJsxzGroup.indexOf("TL")!==-1){
this.showTl = true;
@ -339,21 +319,40 @@ export default {
}
});
},
/** 提交报价组按钮 */
commitForm() {
this.$refs["elForm"].validate(valid => {
if (valid) {
if(this.quotXjFileList == 0){
this.$message.warning("无报价产品 或 未提交询价附件!");
return;
}
commitQuot(this.formData).then(response => {
this.$modal.msgSuccess("提交成功");
});
}
});
this.$store.dispatch('tagsView/delView',this.$route)
this.$router.go(-1)
},
closeForm() {
this.$store.dispatch('tagsView/delView',this.$route)
this.$router.go(-1)
},
/*********************************附件列表数据展示、上传*****************************************/
//-
getQuotXjFileList(){
const param = {relationId:this.form.quotId,fileType:'quotXjFile'}
const param = {relationId:this.formData.quotId,fileType:'quotXjFile'}
quotFileList(param).then(response => {
this.quotXjFileList = response.rows;
});
},
//-
getQuotFkFileList(){
const param = {relationId:this.form.quotId,fileType:'quotFkFile'}
const param = {relationId:this.formData.quotId,fileType:'quotFkFile'}
//
if(this.form.quotApprovalStatus!='1' && checkRole(['SALES_MAN'])){
if(this.formData.quotApprovalStatus!='1' && checkRole(['SALES_MAN'])){
quotFileList(param).then(response => {
this.quotFkFileList = response.rows;
});
@ -365,15 +364,16 @@ export default {
},
//-
getQuotJsgfFileList(){
console.log(this.form.quotId)
const param = {relationId:this.form.quotId,fileType:'quotJsgfFile'}
console.log(this.formData.quotId)
const param = {relationId:this.formData.quotId,fileType:'quotJsgfFile'}
quotFileList(param).then(response => {
this.quotJsgfFileList = response.rows;
console.log(this.quotJsgfFileList)
});
},
//--
getQuotJsqrFileList(fileType){
const param = {relationId:this.form.quotJsxzConfirmId,fileType:fileType}
const param = {relationId:this.formData.quotJsxzConfirmId,fileType:fileType}
quotFileList(param).then(response => {
this.quotJsqrFileList = response.rows;
if('quotJsqrTlFkFile' == fileType){
@ -389,7 +389,7 @@ export default {
},
//-
getQuotHjFileList(){
const param = {relationId:this.form.quotHjId,fileType:'quotHjFile'}
const param = {relationId:this.formData.quotHjId,fileType:'quotHjFile'}
quotFileList(param).then(response => {
this.quotHjFileList = response.rows;
});
@ -401,19 +401,19 @@ export default {
if("quotJsqrTl"==group){
this.addFileTitle = '特缆反馈附件'
this.fileType = 'quotJsqrTlFkFile';
this.uploadDis = (this.form.quotJsqrTlOperateState == 0 ? true : false);
this.uploadDis = (this.formData.quotJsqrTlOperateState == 0 ? true : false);
}else if('quotJsqrDy'==group){
this.addFileTitle = '低压反馈附件'
this.fileType = 'quotJsqrDyFkFile';
this.uploadDis = (this.form.quotJsqrDyOperateState == 0 ? true : false);
this.uploadDis = (this.formData.quotJsqrDyOperateState == 0 ? true : false);
}else if('quotJsqrZy'==group){
this.addFileTitle = '中压反馈附件'
this.fileType = 'quotJsqrZyFkFile';
this.uploadDis = (this.form.quotJsqrZyOperateState == 0 ? true : false);
this.uploadDis = (this.formData.quotJsqrZyOperateState == 0 ? true : false);
}else if('quotJsqrQt'==group){
this.addFileTitle = '其他反馈附件'
this.fileType = 'quotJsqrQtFkFile';
this.uploadDis = (this.form.quotJsqrQtOperateState == 0 ? true : false);
this.uploadDis = (this.formData.quotJsqrQtOperateState == 0 ? true : false);
}
//
this.getQuotJsqrFileList(this.fileType);