12 changed files with 1012 additions and 78 deletions
-
7src/api/customer/customer.js
-
4src/api/project/project.js
-
5src/api/project/projectPart.js
-
11src/assets/scss/_base.scss
-
50src/components/selector/select/BuSelect.vue
-
172src/components/selector/table/customerTable.vue
-
180src/components/selector/table/projectPartTable.vue
-
209src/components/selector/table/projectTable.vue
-
159src/views/modules/quote/detail/quoteDetail.vue
-
272src/views/modules/quote/index.vue
-
2src/views/modules/quote/primary/quoteSearch.vue
-
19src/views/modules/quote/primary/quoteTable.vue
@ -0,0 +1,7 @@ |
|||
import {createAPI} from "../../utils/httpRequest"; |
|||
|
|||
|
|||
export const queryCustomerList = (data) => createAPI(`/customer`,'post',data) |
|||
|
|||
export const queryCustomerListByPage = (data) => createAPI(`/customer/${data.no}/${data.size}`,'post',data) |
|||
|
|||
@ -0,0 +1,4 @@ |
|||
import {createAPI} from "../../utils/httpRequest"; |
|||
|
|||
export const queryProjectList = (data) => createAPI("/project", "post", data); |
|||
export const queryProjectListByPage = (data) => createAPI(`/project/${data.no}/${data.size}`, "post", data); |
|||
@ -0,0 +1,5 @@ |
|||
import {createAPI} from "../../utils/httpRequest"; |
|||
|
|||
export const queryProjectPart = (data) => createAPI(`/project/part`,'post',data) |
|||
|
|||
export const queryProjectPartByPage = (data) => createAPI(`/project/part/${data.no}/${data.size}`,'put',data) |
|||
@ -0,0 +1,50 @@ |
|||
<script> |
|||
import {getSiteAndBuByUserName} from "../../../api/eam/eam"; |
|||
|
|||
export default { |
|||
name: "buSelect", |
|||
data(){ |
|||
return{ |
|||
userBuList:[], |
|||
} |
|||
}, |
|||
methods:{ |
|||
handleQueryBu(){ |
|||
let params = { |
|||
username: this.$store.state.user.name, |
|||
} |
|||
getSiteAndBuByUserName(params).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.userBuList = data.rows |
|||
}else { |
|||
this.$message.warning(data.message) |
|||
} |
|||
}).catch((error)=>{ |
|||
this.$message.error(error) |
|||
}) |
|||
}, |
|||
}, |
|||
created() { |
|||
this.handleQueryBu() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<el-select v-on="$listeners" v-bind="$attrs" style="width: 100%"> |
|||
<el-option |
|||
v-for = "i in userBuList" |
|||
:key = "i.id" |
|||
:label = "i.sitename" |
|||
:value = "i.id"> |
|||
<span style="float: left;width: 100px">{{ i.sitename }}</span> |
|||
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 40px"> |
|||
{{ i.buDesc }} |
|||
</span> |
|||
</el-option> |
|||
</el-select> |
|||
</template> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,172 @@ |
|||
<script> |
|||
import {queryCustomerList, queryCustomerListByPage} from "../../../api/customer/customer"; |
|||
|
|||
export default { |
|||
name: "customerTable", |
|||
model:{ |
|||
prop: "visible", |
|||
event: "update" |
|||
}, |
|||
props:{ |
|||
visible: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
height: { |
|||
type: Number, |
|||
default: 300 |
|||
}, |
|||
isPage:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
customerNo: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
}, |
|||
data(){ |
|||
return{ |
|||
customer:{ |
|||
customerNo:"", |
|||
customerDesc:"", |
|||
active:'' |
|||
}, |
|||
dataList:[], |
|||
no:1, |
|||
size:20, |
|||
total:0, |
|||
queryLoading:false |
|||
} |
|||
}, |
|||
methods:{ |
|||
handleDblClick(row){ |
|||
this.$emit("dblclick",row) |
|||
}, |
|||
handleQueryCustomerList(){ |
|||
let params = { |
|||
...this.customer, |
|||
createBy:this.$store.state.user.name |
|||
} |
|||
this.queryLoading = true |
|||
queryCustomerList(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.dataList = data.rows; |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
this.queryLoading = false |
|||
}).catch((error)=>{ |
|||
this.$message.error(error) |
|||
this.queryLoading = false |
|||
}) |
|||
}, |
|||
handleQueryCustomerListByPage(){ |
|||
let params = { |
|||
...this.customer, |
|||
no:this.no, |
|||
size:this.size |
|||
} |
|||
this.queryLoading = true |
|||
queryCustomerListByPage(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.dataList = data.rows; |
|||
this.total = data.total; |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
this.queryLoading = false |
|||
}).catch((error)=>{ |
|||
this.$message.error(error) |
|||
this.queryLoading = false |
|||
}) |
|||
}, |
|||
handleSizeChange(val){ |
|||
this.size = val |
|||
this.handleQueryCustomerListByPage() |
|||
}, |
|||
handlePageChange(val){ |
|||
this.no = val |
|||
this.handleQueryCustomerListByPage() |
|||
} |
|||
}, |
|||
watch:{ |
|||
visible(newVal,oldVal){ |
|||
if(newVal){ |
|||
if (this.isPage){ |
|||
this.handleQueryCustomerListByPage() |
|||
}else { |
|||
this.handleQueryCustomerList() |
|||
} |
|||
} |
|||
}, |
|||
customerNo(newVal,oldVal){ |
|||
this.customer.customerNo = newVal |
|||
}, |
|||
}, |
|||
computed:{ |
|||
open:{ |
|||
get(){ |
|||
return this.visible |
|||
}, |
|||
set(val){ |
|||
this.$emit("update",val) |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.customer.customerNo = this.customerNo |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<el-dialog title="客户信息" v-drag :visible.sync="open" modal-append-to-body :close-on-click-modal="false" width="800px"> |
|||
<el-form :model="customer" label-position="top"> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="4"> |
|||
<el-form-item label="客户编号"> |
|||
<el-input v-model="customer.customerNo"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item label="客户描述"> |
|||
<el-input v-model="customer.customerDesc"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item label="是否在用" style="width: 100%;"> |
|||
<el-select v-model="customer.active"> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="在用" value="Y"></el-option> |
|||
<el-option label="停用" value="N"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label=" "> |
|||
<el-button type="primary" v-if="isPage" @click="handleQueryCustomerListByPage">查询</el-button> |
|||
<el-button type="primary" v-else @click="handleQueryCustomerList">查询</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<el-table v-loading="queryLoading" :data="dataList" style="width: 100%" :height="height" border @row-dblclick="handleDblClick"> |
|||
<el-table-column label="客户编号" prop="customerNo"></el-table-column> |
|||
<el-table-column label="客户描述" prop="customerDesc"></el-table-column> |
|||
<el-table-column label="客户状态" prop="active"></el-table-column> |
|||
</el-table> |
|||
<el-pagination v-if="isPage" @size-change="handleSizeChange" |
|||
@current-change="handlePageChange" |
|||
:current-page="no" |
|||
:page-sizes="[20, 50, 100, 200, 500]" |
|||
:page-size="size" |
|||
:total="total" |
|||
layout="total,sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,180 @@ |
|||
<script> |
|||
import {queryProjectPart, queryProjectPartByPage} from "../../../api/project/projectPart"; |
|||
|
|||
export default { |
|||
name: "projectPartTable", |
|||
model:{ |
|||
prop: "visible", |
|||
event: "update" |
|||
}, |
|||
props:{ |
|||
visible: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
projectNo:{ |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
isPage:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
height:{ |
|||
type: Number, |
|||
default: 300 |
|||
}, |
|||
partNo:{ |
|||
type: String, |
|||
default: "" |
|||
} |
|||
}, |
|||
data(){ |
|||
return{ |
|||
no:0, |
|||
size:20, |
|||
total:0, |
|||
queryLoading:false, |
|||
projectPartList: [], |
|||
projectPart:{ |
|||
projectNo:"", |
|||
projectDesc:"", |
|||
partNo:"", |
|||
partDesc:"", |
|||
}, |
|||
} |
|||
}, |
|||
methods:{ |
|||
handleQueryProjectPart(){ |
|||
let params = { |
|||
...this.projectPart, |
|||
} |
|||
this.queryLoading = true |
|||
queryProjectPart(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.projectPartList = data.rows |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
this.queryLoading = false |
|||
}).catch((error)=>{ |
|||
this.$message.error(error) |
|||
this.queryLoading = false |
|||
}) |
|||
}, |
|||
handleQueryProjectPartByPage(){ |
|||
let params = { |
|||
...this.projectPart, |
|||
no: this.no, |
|||
size: this.size, |
|||
} |
|||
queryProjectPartByPage(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.projectPartList = data.rows |
|||
this.total = data.total |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
}).catch((error)=>{ |
|||
this.$message.error(error) |
|||
}) |
|||
}, |
|||
handleDblClick(row){ |
|||
this.$emit("dblclick", row) |
|||
}, |
|||
handleSizeChange(val){ |
|||
this.size = val |
|||
this.handleQueryProjectPartByPage() |
|||
}, |
|||
handlePageChange(val){ |
|||
this.no = val |
|||
this.handleQueryProjectPartByPage() |
|||
} |
|||
}, |
|||
computed:{ |
|||
open:{ |
|||
get(){ |
|||
return this.visible |
|||
}, |
|||
set(val){ |
|||
this.$emit("update", val) |
|||
} |
|||
} |
|||
}, |
|||
watch:{ |
|||
projectNo(newVal,oldVal){ |
|||
this.projectPart.projectNo = newVal |
|||
}, |
|||
visible(newVal,oldVal){ |
|||
if(newVal){ |
|||
if (this.isPage){ |
|||
this.handleQueryProjectPartByPage() |
|||
}else { |
|||
this.handleQueryProjectPart() |
|||
} |
|||
} |
|||
}, |
|||
partNo(newVal,oldVal){ |
|||
this.projectPart.partNo = newVal |
|||
} |
|||
}, |
|||
created() { |
|||
this.projectPart.projectNo = this.projectNo |
|||
this.projectPart.projectNo = this.partNo |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<el-dialog title="项目物料信息" v-drag :visible.sync="open" width="800px" :close-on-click-modal="false" modal-append-to-body> |
|||
<el-form :model="projectPart" label-width="100px" label-position="top"> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="4" v-if="!projectNo"> |
|||
<el-form-item label="项目编号"> |
|||
<el-input v-model="projectPart.projectNo"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" v-if="!projectNo"> |
|||
<el-form-item label="项目描述"> |
|||
<el-input v-model="projectPart.projectDesc"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item label="物料编码"> |
|||
<el-input v-model="projectPart.partNo"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item label="物料描述"> |
|||
<el-input v-model="projectPart.partDesc"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item label=" "> |
|||
<el-button type="primary" v-if="isPage" @click="handleQueryProjectPartByPage">查询</el-button> |
|||
<el-button type="primary" v-else @click="handleQueryProjectPart">查询</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<el-table v-loading="queryLoading" :data="projectPartList" style="width: 100%" border :height="height" @row-dblclick="handleDblClick"> |
|||
<el-table-column prop="buDesc" label="BU" ></el-table-column> |
|||
<el-table-column prop="projectNo" label="项目编码" ></el-table-column> |
|||
<el-table-column prop="projectDesc" label="项目描述"></el-table-column> |
|||
<el-table-column prop="partNo" label="物料编码" ></el-table-column> |
|||
<el-table-column prop="partDesc" label="物料描述" ></el-table-column> |
|||
</el-table> |
|||
<el-pagination v-if="isPage" @size-change="handleSizeChange" |
|||
@current-change="handlePageChange" |
|||
:current-page="no" |
|||
:page-sizes="[20, 50, 100, 200, 500]" |
|||
:page-size="size" |
|||
:total="total" |
|||
layout="total,sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,209 @@ |
|||
<script> |
|||
import BuSelect from "../select/BuSelect.vue"; |
|||
import {queryProjectList, queryProjectListByPage} from "../../../api/project/project"; |
|||
|
|||
export default { |
|||
name: "projectTable", |
|||
components: {BuSelect}, |
|||
model:{ |
|||
prop: "visible", |
|||
event: "update" |
|||
}, |
|||
props:{ |
|||
visible: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
customerNo:{ |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
height:{ |
|||
type: Number, |
|||
default: 300 |
|||
}, |
|||
isPage:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
projectNo:{ |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
buId:{ |
|||
type: Number, |
|||
default: "" |
|||
}, |
|||
width:{ |
|||
type: Number, |
|||
default: 800 |
|||
} |
|||
}, |
|||
data(){ |
|||
return{ |
|||
no:1, |
|||
size:20, |
|||
total:0, |
|||
project:{ |
|||
buId:"", |
|||
projectNo:"", |
|||
projectDesc:"", |
|||
customerNo: "", |
|||
customerDesc: "" |
|||
}, |
|||
dataList:[], |
|||
queryLoading: false, |
|||
} |
|||
}, |
|||
methods:{ |
|||
handleDblClick(row){ |
|||
this.$emit("dblclick",row) |
|||
}, |
|||
handleSizeChange(val){ |
|||
this.size = val |
|||
this.handleQueryProjectListByPage() |
|||
}, |
|||
handlePageChange(val){ |
|||
this.no = val |
|||
this.handleQueryProjectListByPage() |
|||
}, |
|||
handleQueryProjectListByPage(){ |
|||
let params = { |
|||
...this.project, |
|||
createBy: this.$store.state.user.name, |
|||
no:this.no, |
|||
size:this.size |
|||
} |
|||
this.queryLoading = true |
|||
queryProjectListByPage(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.dataList = data.rows |
|||
this.total = data.total |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
this.queryLoading = false |
|||
}).catch((error)=>{ |
|||
this.$message.error(error) |
|||
this.queryLoading = false |
|||
}) |
|||
}, |
|||
handleQueryProjectList(){ |
|||
let params = { |
|||
...this.project, |
|||
createBy: this.$store.state.user.name |
|||
} |
|||
this.queryLoading = true |
|||
queryProjectList(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.dataList = data.rows |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
this.queryLoading = false |
|||
}).catch((error)=>{ |
|||
this.$message.error(error) |
|||
this.queryLoading = false |
|||
}) |
|||
}, |
|||
}, |
|||
created() { |
|||
this.project.buId = this.buId |
|||
this.project.customerNo = this.customerNo |
|||
this.project.projectNo = this.projectNo |
|||
}, |
|||
watch:{ |
|||
visible(newVal,oldVal){ |
|||
if (newVal){ |
|||
if (this.isPage){ |
|||
this.handleQueryProjectListByPage(); |
|||
}else { |
|||
this.handleQueryProjectList(); |
|||
} |
|||
} |
|||
}, |
|||
customerNo(newVal,oldVal){ |
|||
this.project.customerNo = newVal |
|||
}, |
|||
projectNo(newVal,oldVal){ |
|||
this.project.projectNo = newVal |
|||
}, |
|||
buId(newVal,oldVal){ |
|||
this.project.buId = newVal |
|||
}, |
|||
}, |
|||
computed:{ |
|||
open:{ |
|||
get(){ |
|||
return this.visible |
|||
}, |
|||
set(val){ |
|||
this.$emit("update",val) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<el-dialog :visible.sync="open" v-drag title="项目信息" :close-on-click-modal="false" modal-append-to-body :width="`${width}px`"> |
|||
<el-form :model="project" label-position="top" label-width="100px"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="6" v-if="!buId"> |
|||
<el-form-item label="BU"> |
|||
<bu-select v-model="project.buId" clearable></bu-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="项目编号"> |
|||
<el-input v-model="project.projectNo"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="项目名称"> |
|||
<el-input v-model="project.projectDesc"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24" v-if="!customerNo"> |
|||
<el-row :gutter="20" > |
|||
<el-col :span="6" > |
|||
<el-form-item label="客户编码"> |
|||
<el-input v-model="project.customerNo"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="客户名称"> |
|||
<el-input v-model="project.customerDesc"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-col> |
|||
<el-col :span="4" > |
|||
<el-form-item label=" "> |
|||
<el-button type="primary" v-if="isPage" @click="handleQueryProjectListByPage">查询</el-button> |
|||
<el-button type="primary" v-else @click="handleQueryProjectList">查询</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<el-table :data="dataList" border style="width: 100%" :height="height" v-loading="queryLoading" @row-dblclick="handleDblClick"> |
|||
<el-table-column label="BU" prop="buDesc"></el-table-column> |
|||
<el-table-column label="项目编号" prop="projectNo"></el-table-column> |
|||
<el-table-column label="项目名称" prop="projectDesc"></el-table-column> |
|||
<el-table-column label="客户编码" prop="customerNo"></el-table-column> |
|||
<el-table-column label="客户描述" prop="customerDesc"></el-table-column> |
|||
</el-table> |
|||
<el-pagination v-if="isPage" @size-change="handleSizeChange" |
|||
@current-change="handlePageChange" |
|||
:current-page="no" |
|||
:page-sizes="[20, 50, 100, 200, 500]" |
|||
:page-size="size" |
|||
:total="total" |
|||
layout="total,sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,159 @@ |
|||
<script> |
|||
import ProjectPartTable from "../../../../components/selector/table/projectPartTable.vue"; |
|||
import {queryProjectPart} from "../../../../api/project/projectPart"; |
|||
|
|||
export default { |
|||
name: "quoteDetail", |
|||
components: {ProjectPartTable}, |
|||
props:{ |
|||
quote:{ |
|||
type:Object, |
|||
required:true |
|||
}, |
|||
height:{ |
|||
type:Number, |
|||
default:300 |
|||
}, |
|||
|
|||
}, |
|||
data(){ |
|||
return{ |
|||
quoteDetail:{ |
|||
id:null, |
|||
partNo:'', |
|||
partDesc:'', |
|||
projectNo:'', |
|||
projectDesc:'', |
|||
qty:null, |
|||
remark:'', |
|||
}, |
|||
saveQuoteDetail:{ |
|||
|
|||
}, |
|||
dataList:[], |
|||
saveLoading:false, |
|||
saveVisible:false, |
|||
saveQuoteDetailRules:{ |
|||
partNo: [{required: true, message: '请输入物料编码', trigger: ['blur','change']}], |
|||
partDesc: [{required: true, message: '请输入物料名称', trigger: ['blur','change']}], |
|||
qty: [{required: true, message: '请输入数量', trigger: ['blur','change']}], |
|||
}, |
|||
projectPartVisible:false, |
|||
} |
|||
}, |
|||
methods:{ |
|||
handleSaveQuoteDetail(row){ |
|||
this.$nextTick(()=>{ |
|||
this.$refs.saveQuoteDetailForm.clearValidate(); |
|||
}) |
|||
if (row){ |
|||
this.saveQuoteDetail = { |
|||
...row |
|||
} |
|||
}else { |
|||
this.saveQuoteDetail = { |
|||
...this.quoteDetail, |
|||
createBy:this.$store.state.user.name, |
|||
status:'下达', |
|||
active:'Y', |
|||
qty:1, |
|||
isDetail:false, |
|||
} |
|||
this.$nextTick(()=>{ |
|||
this.saveQuoteDetail.projectNo = this.quote.projectNo |
|||
}) |
|||
} |
|||
this.saveVisible = true; |
|||
}, |
|||
handleDblClick(row){ |
|||
this.saveQuoteDetail.partNo = row.partNo; |
|||
this.saveQuoteDetail.partDesc = row.partDesc; |
|||
this.projectPartVisible = false; |
|||
}, |
|||
handlePartNoBlur(){ |
|||
let params = { |
|||
partNo: this.saveQuoteDetail.partNo, |
|||
projectNo: this.quote.projectNo, |
|||
} |
|||
queryProjectPart(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
if (data.rows.length === 1){ |
|||
this.saveQuoteDetail.partDesc = data.rows[0].partDesc; |
|||
}else { |
|||
this.saveQuoteDetail.partDesc = ''; |
|||
} |
|||
}else { |
|||
this.$message.warning(data.msg); |
|||
} |
|||
}).catch((error)=>{ |
|||
this.$message.error(error); |
|||
}) |
|||
}, |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<div> |
|||
<el-button type="primary" @click="handleSaveQuoteDetail(null)">新增</el-button> |
|||
|
|||
<el-table border :data="dataList" style="width: 100%;margin-top: 5px" :height="height"> |
|||
|
|||
</el-table> |
|||
|
|||
<el-dialog :title="`报价明细`" v-drag :visible.sync="saveVisible" :width="`${saveQuoteDetail.id?1200:600}px`" modal-append-to-body :close-on-click-modal="false"> |
|||
<el-form :model="saveQuoteDetail" ref="saveQuoteDetailForm" :rules="saveQuoteDetailRules" label-position="top" v-if="!saveQuoteDetail.id"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="8"> |
|||
<el-form-item label="物料名称" prop="partNo" :show-message="false"> |
|||
<span slot="label"> |
|||
<a @click="projectPartVisible = true">物料名称</a> |
|||
</span> |
|||
<el-input v-model="saveQuoteDetail.partNo" @blur="handlePartNoBlur"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="16"> |
|||
<el-form-item label="物料描述" prop="partDesc" :show-message="false"> |
|||
<el-input v-model="saveQuoteDetail.partDesc" disabled></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="报价数量" prop="qty" :show-message="false"> |
|||
<el-input-number style="width: 100%;" v-model="saveQuoteDetail.qty" :min="1" :step="0" :precision="0" :controls="false"></el-input-number> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="8"> |
|||
<el-form-item label="" :show-message="false"> |
|||
<el-checkbox v-model="saveQuoteDetail.isDetail">保存进入报价页面</el-checkbox> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<el-form-item label="备注" class="auto" :show-message="false"> |
|||
<el-input type="textarea" v-model="saveQuoteDetail.remark"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" >确 定</el-button> |
|||
<el-button @click="saveVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<project-part-table v-if="saveVisible" v-model="projectPartVisible" :project-no="saveQuoteDetail.projectNo" :part-no="saveQuoteDetail.partNo" @dblclick="handleDblClick"></project-part-table> |
|||
</div> |
|||
</template> |
|||
|
|||
<style scoped> |
|||
.el-table /deep/ .cell{ |
|||
height: auto; |
|||
line-height: 1.5; |
|||
} |
|||
|
|||
.auto /deep/ .el-form-item__content{ |
|||
height: auto; |
|||
line-height: 1.5; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue