8 changed files with 2145 additions and 745 deletions
@ -1,207 +1,305 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>【详情】排产申请</div> |
|||
<!--start 详情按钮--> |
|||
<div> |
|||
<el-button itype="info" size="small" @click="handleReturn()">返回</el-button> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--end 详情按钮--> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<div class="listconadd"><!-- --> |
|||
<div class="title">排产申请</div> |
|||
<el-form ref="form_obj" :model="formobj" :inline="true" label-width="120px"> |
|||
<div style="border-bottom: 2px solid #e0e3eb; height: 40px;"> |
|||
<!--第一行--> |
|||
<el-row> |
|||
<el-col :span="10" style="margin-left: 80px; height: 20px;"> |
|||
<el-form-item label="单据编号:">{{ formobj.applicationCode }}</el-form-item> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>排产申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6" style=" height: 20px;"> |
|||
<el-form-item label="制单人:">{{ formobj.makeListName }}</el-form-item> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="5" style=" height: 20px;"> |
|||
<el-form-item label="制单日期:">{{ formobj.applicationDate }}</el-form-item> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
<div class="invoiceadd" style="margin-top: 5px;"> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item prop="schedulingType" label="排产类型"> |
|||
<el-input v-model="formobj.schedulingType" placeholder="" class="addinputw" |
|||
readonly/> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.createByName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="24"> |
|||
<el-form-item prop="depositPayment" label="排产订金使用"> |
|||
<el-input v-model="formobj.depositPayment" placeholder="" class="addinputw" |
|||
readonly/> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationDate" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<el-form-item prop="remarks" label="备注"> |
|||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw" |
|||
readonly/> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="排产类型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.schedulingType" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linethree"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">排产车型列表</div> |
|||
</div> |
|||
<div class="addtable"> |
|||
<div class="tabletitle"> |
|||
<div class="titlename"> |
|||
货物明细 |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.busVehicleApplyDetailDtoList" :index="index" show-summary :summary-method="getSummaries" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车型" align="left" header-align="center" width="250"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<span>{{ scope.row.vehicleName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="configName"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="排产数量" header-align="center" width="130"> |
|||
<template slot-scope="scope" prop="quantity"> |
|||
<span>{{ scope.row.quantity }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="useDeposit" label="使用订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="useDeposit"> |
|||
<span>{{ scope.row.useDeposit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="applyForDeposit" label="申请订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="applyForDeposit"> |
|||
<span>{{ scope.row.applyForDeposit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售指导价" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="saleGuPrice"> |
|||
<span>{{ scope.row.saleGuPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center" width="200"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<span>{{ scope.row.remarks }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">订金使用情况</div> |
|||
</div> |
|||
<template class="tablelist"> |
|||
<!-- :rules="rules" <el-table :data="tableData" :index="index" border tyle="width: 100%">--> |
|||
<el-table |
|||
:data="formobj.busVehicleApplyDetailVoList" |
|||
:index="index" |
|||
border |
|||
style="width: 100%"> <!-- show-summary :summary-method="getSummaries" --> |
|||
<el-table-column |
|||
align="center" |
|||
label="序号" |
|||
type="index" |
|||
width="50"/> |
|||
<el-table-column prop="vehicleName" width="210" label="车型" align="center"> |
|||
<template slot-scope="props"> |
|||
<span>{{props.row.vehicleName}}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="configName" width="210" label="简述配置" align="center"> |
|||
<template slot-scope="props"> |
|||
<!-- <el-input v-model="props.row.mName" style="width:120px;" class="tableinput"/>--> |
|||
<span>{{props.row.configName}}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="spOrDiConDes" width="300" label="特殊或差异配置说明" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.spOrDiConDes" style="width:203px;" class="tableinput"/> |
|||
<!-- <span>{{props.row.model}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="actualQuantity" width="180" label="排产数量" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.actualQuantity" style="width:150px;" class="tableinput"/> |
|||
<!--<span>{{props.row.count}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="proSchDep" width="180" label="排产订金" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.proSchDep" style="width:150px;" class="tableinput"/> |
|||
<!-- <span>{{props.row.leviedSubtotal}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="saleGuPrice " width="180" label="销售指导价" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.saleGuPrice " style="width:150px;" class="tableinput"/> |
|||
<!-- <span>{{props.row.company}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="remarks" width="280" label="备注" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.remarks" style="width:180px;" class="tableinput"/> |
|||
<!-- <span>{{props.row.remarks}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
<el-form ref="formobj" :model="formobj" label-width="130px" label-position="top" class="formadd"> |
|||
<el-row> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="当前订金金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ formobj.currentAmount }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次需使用金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ useMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次申请金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ applyMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
|
|||
export default { |
|||
name: 'cheliangpaichanInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
|
|||
viewState: 4, |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
createBySid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
orgSid: window.sessionStorage.getItem('orgSid'), // 部门sid |
|||
orgName: window.sessionStorage.getItem('departmentName'), // 部门名称 |
|||
makeListName: window.sessionStorage.getItem('name'),//制单人 |
|||
applicationCode:'', |
|||
applicationDate:'', |
|||
schedulingType: '',// 排产类型 |
|||
depositPayment: '', // 排产订金使用 |
|||
remarks: '', // 备注 |
|||
busVehicleApplyDetailDtoList: [{ |
|||
vehicleName: '', // 车型 |
|||
configName: '', // 简述配置 |
|||
spOrDiConDes: '', // 特殊或差异 |
|||
actualQuantity: '', // 排产数量 |
|||
proSchDep: '', // 排产订金 |
|||
saleGuPrice: '', // 销售指导价 |
|||
remarks:'' // 备注 |
|||
}] |
|||
}, |
|||
} |
|||
}, |
|||
methods: { |
|||
handleReturn() { |
|||
this.formobj.scmOtherInboundDto = {} |
|||
this.formobj.scmOtherInboundDetailDto = [{}] |
|||
this.$emit('doback') |
|||
}, |
|||
showInfo(sid, row) { |
|||
this.viewTitle = '其他入库单详情' |
|||
const _this = this |
|||
console.log('详情页面', sid) |
|||
req.fetchBySid(sid).then(resp => { |
|||
const data = resp.data |
|||
// this.formobj = data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.applicationDate = data.applicationDate |
|||
this.formobj.schedulingType = data.schedulingType |
|||
this.formobj.depositPayment = data.depositPayment |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.sid = sid |
|||
// //明细表 |
|||
this.formobj.busVehicleApplyDetailVoList = data.busVehicleApplyDetailVoList |
|||
}).catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
export default { |
|||
name: 'cheliangpaichanInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
useMoney: '', // 本次需使用金额 |
|||
applyMoney: '', // 本次申请金额 |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
createBySid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
createByName: window.sessionStorage.getItem('name'), // 制单人 |
|||
applicationCode: '', // 申请编号 |
|||
applicationDate: '', // 申请日期 |
|||
schedulingType: '', // 排产类型 |
|||
remarks: '', // 备注 |
|||
currentAmount: '', // 当前订金金额 |
|||
busVehicleApplyDetailDtoList: [] |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '排产申请详情' |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.applicationDate = data.applicationDate |
|||
this.formobj.schedulingType = data.schedulingType |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.currentAmount = data.currentAmount |
|||
this.formobj.sid = sid |
|||
this.formobj.busVehicleApplyDetailDtoList = data.busVehicleApplyDetailVoList |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj.schedulingType = '' // 排产类型 |
|||
this.formobj.remarks = '' // 备注 |
|||
this.formobj.currentAmount = '' |
|||
this.formobj.createByName = '' |
|||
this.formobj.createBySid = '' |
|||
this.formobj.applicationCode = '' |
|||
this.formobj.applicationDate = '' |
|||
this.formobj.busVehicleApplyDetailDtoList = [] |
|||
this.list1 = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
// 合计 |
|||
getSummaries(param) { |
|||
const { columns, data } = param |
|||
const sums = [] |
|||
columns.forEach((column, index) => { |
|||
if (index === 0) { |
|||
sums[index] = '合计' |
|||
return |
|||
} |
|||
const values = data.map(item => Number(item[column.property])) |
|||
if (column.property === 'useDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.useMoney = sums[index] += '' |
|||
} else if (column.property === 'applyForDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.applyMoney = sums[index] += '' |
|||
} else { |
|||
if (!values.every(value => isNaN(value))) { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.amount = sums[index] += '' |
|||
} else { |
|||
sums[index] = '' |
|||
} |
|||
} |
|||
}) |
|||
return sums |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/* 利用穿透,设置input边框隐藏 */ |
|||
.invoiceadd >>> .el-input__inner { |
|||
border: 0; |
|||
border-bottom: 1px solid #e0e3eb !important; |
|||
} |
|||
|
|||
/* 如果你的 el-input type 设置成textarea ,就要用这个了 */ |
|||
/*.invoiceadd>>>.el-textarea__inner { |
|||
border: 0; |
|||
resize: none;!* 这个是去掉 textarea 下面拉伸的那个标志,如下图 *! |
|||
}*/ |
|||
.invoiceadd >>> .el-form-item__content { |
|||
margin-left: 0 !important; |
|||
} |
|||
|
|||
.el-input { |
|||
width: 230px; |
|||
} |
|||
|
|||
.el-col .el-form-item { |
|||
margin-bottom: 10px; |
|||
} |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linethree .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
.formadd{ |
|||
padding: 0px !important; |
|||
} |
|||
.icon { |
|||
color: #e84026; |
|||
margin-right: 4px; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,191 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>车型常用列表</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="webcon"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|||
<el-form-item label="客户名称:"> |
|||
<el-input v-model="listQuery.params.customerName" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="合同编号:"> |
|||
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<div class="searchbtns"> |
|||
<el-button type="primary" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" @click="handresetting">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center"/> |
|||
<el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column label="车型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.modelName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
|
|||
export default { |
|||
name: "chexingbyconfiguration", |
|||
components: { |
|||
Pagination |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, |
|||
searchxianshitit: '隐藏查询条件', |
|||
tableKey: 0, |
|||
showbackState: 30, |
|||
sids: [], |
|||
list: [], |
|||
datalist: [], |
|||
number: '', |
|||
listLoading: false, |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
contractNo: '', |
|||
customerName: '' |
|||
}, |
|||
total: 1 |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
// 加载列表 |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
init() { |
|||
this.getList() |
|||
}, |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.configurationlistPage(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.code == '200') { |
|||
this.listQuery.total = response.data.total |
|||
this.list = response.data.records |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.getList() |
|||
}, |
|||
// 重置按钮 |
|||
handresetting() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
contractNo: '', |
|||
customerName: '' |
|||
}, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
handleSelectionChange(row) { |
|||
this.sids = [] |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push({ |
|||
modelName: element.modelName, |
|||
modelSid: element.modelSid, |
|||
configName: element.configName, |
|||
configurationItemsSid: element.configurationItemsSid |
|||
}) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
showData(value) { |
|||
if (value.length > 0){ |
|||
for (var i = 0; i < value.length; i++) { |
|||
this.datalist.push(value[i]) |
|||
} |
|||
} else { |
|||
this.datalist = [] |
|||
} |
|||
if (this.datalist.length > 0) { |
|||
for (var j = 0; j < this.datalist.length; j++) { |
|||
for (var k = 0; k < this.list.length; k++) { |
|||
if (this.datalist[j].vehicleName == this.list[k].modelName && this.datalist[j].configName == this.list[k].configName) { |
|||
this.$refs.multipleTable.toggleRowSelection(this.list[k], true) |
|||
} |
|||
} |
|||
} |
|||
} else { |
|||
this.$refs.multipleTable.clearSelection() |
|||
} |
|||
}, |
|||
// 添加修改返回 |
|||
AddUpdateReturn() { |
|||
if (this.sids.length > 0) { |
|||
this.$emit('backData', this.sids) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '请选择至少一条记录进行删除操作!', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,455 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState== 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="dialogStatus === 'add' ? saveAdd() : saveEdit()">保存 |
|||
</el-button> |
|||
<el-button type="primary" size="small" @click="submitVehicleApply()">提交 |
|||
</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>排产申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.createByName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationDate" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="排产类型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-select v-model="formobj.schedulingType" placeholder="请选择" clearable> |
|||
<el-option v-for="item in schedulingType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linethree"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">排产车型列表</div> |
|||
<div style="margin-left: 15px"> |
|||
<el-button type="primary" size="small" icon="el-icon-plus" @click="addCommodity()">添加</el-button> |
|||
</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.busVehicleApplyDetailDtoList" :index="index" show-summary :summary-method="getSummaries" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column fixed prop="name" label="操作" width="80px" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button size="mini" type="danger" @click="dataDelete(scope.$index, formobj.busVehicleApplyDetailDtoList[scope.$index])">删除 |
|||
</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="车型" align="left" header-align="center" width="250"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<span>{{ scope.row.vehicleName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="configName"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="排产数量" header-align="center" width="130"> |
|||
<template slot-scope="scope" prop="quantity"> |
|||
<el-input v-model="scope.row.quantity" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="useDeposit" label="使用订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="useDeposit"> |
|||
<el-input v-model="scope.row.useDeposit" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="applyForDeposit" label="申请订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="applyForDeposit"> |
|||
<el-input v-model="scope.row.applyForDeposit" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售指导价" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="saleGuPrice"> |
|||
<el-input v-model="scope.row.saleGuPrice" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">订金使用情况</div> |
|||
</div> |
|||
<el-form ref="formobj" :model="formobj" label-width="130px" label-position="top" class="formadd"> |
|||
<el-row> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="当前订金金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.currentAmount" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次需使用金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ useMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次申请金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ applyMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
<!--选择车型和常用配置--> |
|||
<configuration v-show="viewState == 2" ref="divconfiguration" @backData="backData" @doback="closePage"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
import configuration from './chexingbyconfiguration' |
|||
export default { |
|||
name: 'cheliangpaichanEdit', |
|||
components: { |
|||
configuration |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
dialogStatus: '', |
|||
viewState: 1, |
|||
index: 0, |
|||
tableKey: 0, |
|||
// 下拉框 |
|||
schedulingType_list: [], // 排产订金使用 |
|||
list1: [], |
|||
useMoney: '', // 本次需使用金额 |
|||
applyMoney: '', // 本次申请金额 |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
createBySid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
createByName: window.sessionStorage.getItem('name'), // 制单人 |
|||
applicationCode: '', // 申请编号 |
|||
applicationDate: '', // 申请日期 |
|||
schedulingType: '', // 排产类型 |
|||
remarks: '', // 备注 |
|||
currentAmount: '', // 当前订金金额 |
|||
busVehicleApplyDetailDtoList: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置 |
|||
var b = window.location.href.indexOf('#data') // 第一个#data出现的位置 |
|||
const info = window.location.href.slice(a, b) |
|||
var sid = info.substr(info.indexOf('=') + 1) |
|||
this.showInfo(sid) |
|||
this.getSchedulingType() |
|||
}, |
|||
methods: { |
|||
// 下拉框-排产类型 |
|||
getSchedulingType() { |
|||
req.pullDown({ type: 'schedulingType' }).then((res) => { |
|||
if (res.code == '200') { |
|||
this.schedulingType_list = res.data |
|||
console.log('下拉框请求111', res.data) |
|||
} |
|||
}) |
|||
}, |
|||
// 明细表添加一行数据 |
|||
addCommodity() { |
|||
this.viewState = 2 |
|||
this.$refs['divconfiguration'].showData(this.list1) |
|||
}, |
|||
// 明细表删除一行数据 |
|||
dataDelete(index, row) { |
|||
this.formobj.busVehicleApplyDetailDtoList.splice(index, 1) |
|||
this.list1.splice(index, 1) |
|||
}, |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.dialogStatus = 'edit' |
|||
this.viewTitle = '【编辑】排产申请' |
|||
console.log('编辑回显', sid) |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.applicationDate = data.applicationDate |
|||
this.formobj.schedulingType = data.schedulingType |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.currentAmount = data.currentAmount |
|||
this.formobj.sid = sid |
|||
this.formobj.busVehicleApplyDetailDtoList = data.busVehicleApplyDetailVoList |
|||
this.list1 = data.busVehicleApplyDetailVoList |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
// 车型常用配置列表--新增确定返回的数据 |
|||
backData(value) { |
|||
this.viewState = 1 |
|||
// this.formobj.busVehicleApplyDetailDtoList = [] |
|||
if (this.formobj.busVehicleApplyDetailDtoList.length > 0) { |
|||
for (var i = 0; i < value.length; i++) { |
|||
for (var u = 0; u < this.formobj.busVehicleApplyDetailDtoList.length; u++) { |
|||
if (value[i].modelName == this.formobj.busVehicleApplyDetailDtoList[u].vehicleName && value[i].configName == this.formobj.busVehicleApplyDetailDtoList[u].configName) { |
|||
value.splice(value[i], 1) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if (value.length > 0) { |
|||
value.forEach((e) => { |
|||
this.formobj.busVehicleApplyDetailDtoList.push({ |
|||
quantity: '', |
|||
applySid: '', |
|||
configSid: e.configurationItemsSid, |
|||
configName: e.configName, |
|||
useDeposit: '', |
|||
applyForDeposit: '', |
|||
remarks: '', |
|||
saleGuPrice: '', |
|||
vehicleName: e.modelName, |
|||
vehicleSid: e.modelSid |
|||
}) |
|||
}) |
|||
this.list1 = this.formobj.busVehicleApplyDetailDtoList |
|||
} |
|||
}, |
|||
saveAdd() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveAdd(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.code == '200') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
saveEdit() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveEdit(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
submitVehicleApply() { |
|||
console.log(this.formobj,858585) |
|||
req.submitVehicleApply(this.formobj).then((res) => { |
|||
if (res.code == '200') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '提交成功' |
|||
}) |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '提交失败' |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj.schedulingType = '' // 排产类型 |
|||
this.formobj.remarks = '' // 备注 |
|||
this.formobj.currentAmount = '' |
|||
this.formobj.applicationCode = '' |
|||
this.formobj.applicationDate = '' |
|||
this.formobj.busVehicleApplyDetailDtoList = [] |
|||
this.list1 = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$refs['divconfiguration'].getList() |
|||
this.$emit('doback') |
|||
}, |
|||
// 合计 |
|||
getSummaries(param) { |
|||
const { columns, data } = param |
|||
const sums = [] |
|||
columns.forEach((column, index) => { |
|||
if (index === 0) { |
|||
sums[index] = '合计' |
|||
return |
|||
} |
|||
const values = data.map(item => Number(item[column.property])) |
|||
if (column.property === 'useDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.useMoney = sums[index] += '' |
|||
} else if (column.property === 'applyForDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.applyMoney = sums[index] += '' |
|||
} else { |
|||
if (!values.every(value => isNaN(value))) { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.amount = sums[index] += '' |
|||
} else { |
|||
sums[index] = '' |
|||
} |
|||
} |
|||
}) |
|||
return sums |
|||
}, |
|||
closePage() { |
|||
this.viewState = 1 |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linethree .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
/* padding: 0 10px 0 0; */ |
|||
text-align: right; |
|||
} |
|||
.formadd{ |
|||
padding: 0px !important; |
|||
} |
|||
.icon { |
|||
color: #e84026; |
|||
margin-right: 4px; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,529 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button v-show="transactState=='00'" type="primary" @click="openAgree">同 意</el-button> |
|||
<el-button v-show="transactState=='00'" type="danger" @click="openReject">驳 回</el-button> |
|||
<el-button v-show="transactState=='00'" type="danger" @click="openStop">终 止</el-button> |
|||
<el-button v-show="transactState=='01'" type="danger" @click="openRevoke">撤 回 </el-button> |
|||
<el-button type="info" @click="centerDialogVisible = false">关 闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>排产申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.createByName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationDate" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="排产类型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.schedulingType" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linethree"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div v-show="transactState=='00'"> |
|||
<!-- <div class="diaTitle"><i class="el-icon-chat-line-square"></i><span>审批意见</span></div>--> |
|||
<el-form :model="dialogList" :inline="true" label-width="80px"> |
|||
<el-row> |
|||
<el-col> |
|||
<el-form-item label="审批意见"> |
|||
<el-input v-model="dialogList.comment" type="textarea" maxlength="20" placeholder="请输入审批意见" class="inputType" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">排产车型列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.busVehicleApplyDetailDtoList" :index="index" show-summary :summary-method="getSummaries" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车型" align="left" header-align="center" width="250"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<span>{{ scope.row.vehicleName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="configName"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="排产数量" header-align="center" width="130"> |
|||
<template slot-scope="scope" prop="quantity"> |
|||
<span>{{ scope.row.quantity }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="useDeposit" label="使用订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="useDeposit"> |
|||
<span>{{ scope.row.useDeposit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="applyForDeposit" label="申请订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="applyForDeposit"> |
|||
<span>{{ scope.row.applyForDeposit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售指导价" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="saleGuPrice"> |
|||
<span>{{ scope.row.saleGuPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center" width="200"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<span>{{ scope.row.remarks }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">订金使用情况</div> |
|||
</div> |
|||
<el-form ref="formobj" :model="formobj" label-width="130px" label-position="top" class="formadd"> |
|||
<el-row> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="当前订金金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ formobj.currentAmount }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次需使用金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ useMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次申请金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ applyMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
import { businessAgree, rejectTask, breakTask, revokeTask } from '@/api/flow/todo' |
|||
export default { |
|||
name: 'cheliangpaichanInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
useMoney: '', // 本次需使用金额 |
|||
applyMoney: '', // 本次申请金额 |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
createBySid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
createByName: window.sessionStorage.getItem('name'), // 制单人 |
|||
applicationCode: '', // 申请编号 |
|||
applicationDate: '', // 申请日期 |
|||
schedulingType: '', // 排产类型 |
|||
remarks: '', // 备注 |
|||
currentAmount: '', // 当前订金金额 |
|||
busVehicleApplyDetailDtoList: [] |
|||
}, |
|||
transactState: '', // 办理状态 |
|||
// 同意办理列表 |
|||
agreeList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 驳回列表 |
|||
regectList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 终止列表 |
|||
stopList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 撤回 |
|||
revokeList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置 |
|||
var b = window.location.href.indexOf('#data') // 第一个#data出现的位置 |
|||
const info = window.location.href.slice(a, b) |
|||
var sid = info.substr(info.indexOf('=') + 1) |
|||
this.showInfo(sid) |
|||
// ===获取参数 |
|||
var one = window.location.href.lastIndexOf('#') + 1 |
|||
var two = window.location.href.lastIndexOf('}') + 1 |
|||
const data = decodeURI(window.location.href.slice(one, two)) // url解码unescape()已从web中移除,尽量不使用 |
|||
var tar = data.substr(data.indexOf('=') + 1) |
|||
const obj = JSON.parse(tar) |
|||
console.log('iframe页面获取的obj:', obj) |
|||
// 同意列表 |
|||
this.agreeList.businessSid = sid |
|||
this.agreeList.instanceId = obj.instanceId |
|||
this.agreeList.taskId = obj.taskId |
|||
// 驳回列表 |
|||
this.regectList.businessSid = sid |
|||
this.regectList.instanceId = obj.instanceId |
|||
this.regectList.taskId = obj.taskId |
|||
// 终止列表 |
|||
this.stopList.businessSid = sid |
|||
this.stopList.instanceId = obj.instanceId |
|||
this.stopList.taskId = obj.taskId |
|||
// 撤回列表 |
|||
this.revokeList.businessSid = sid |
|||
this.revokeList.instanceId = obj.instanceId |
|||
this.revokeList.taskId = obj.taskId |
|||
// 办理状态 |
|||
this.transactState = obj.transactState |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '排产申请详情' |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.applicationDate = data.applicationDate |
|||
this.formobj.schedulingType = data.schedulingType |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.currentAmount = data.currentAmount |
|||
this.formobj.sid = sid |
|||
this.formobj.busVehicleApplyDetailDtoList = data.busVehicleApplyDetailVoList |
|||
}).catch((e) => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree() { |
|||
this.$confirm('是否确认执行同意操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleAgree() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消同意' |
|||
}) |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject() { |
|||
this.$confirm('是否确认执行驳回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleReject() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消驳回' |
|||
}) |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop() { |
|||
this.$confirm('是否确认执行终止操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleStop() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消终止' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.agreeList.comment = this.dialogList.comment |
|||
businessAgree(this.agreeList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.refreshIt() |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.stopList.comment = this.dialogList.comment |
|||
breakTask(this.stopList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.regectList.comment = this.dialogList.comment |
|||
rejectTask(this.regectList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
this.revokeList.comment = this.dialogList.comment |
|||
revokeTask(this.revokeList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 合计 |
|||
getSummaries(param) { |
|||
const { columns, data } = param |
|||
const sums = [] |
|||
columns.forEach((column, index) => { |
|||
if (index === 0) { |
|||
sums[index] = '合计' |
|||
return |
|||
} |
|||
const values = data.map(item => Number(item[column.property])) |
|||
if (column.property === 'useDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.useMoney = sums[index] += '' |
|||
} else if (column.property === 'applyForDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.applyMoney = sums[index] += '' |
|||
} else { |
|||
if (!values.every(value => isNaN(value))) { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.amount = sums[index] += '' |
|||
} else { |
|||
sums[index] = '' |
|||
} |
|||
} |
|||
}) |
|||
return sums |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.diaTitle { |
|||
padding: 30px 0 15px 0; |
|||
font-size: 20px; |
|||
font-weight: 500; |
|||
} |
|||
.inputType { |
|||
width: 600px; |
|||
} |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linethree .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
.formadd{ |
|||
padding: 0px !important; |
|||
} |
|||
.icon { |
|||
color: #e84026; |
|||
margin-right: 4px; |
|||
} |
|||
</style> |
@ -0,0 +1,191 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>车型常用列表</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="webcon"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|||
<el-form-item label="客户名称:"> |
|||
<el-input v-model="listQuery.params.customerName" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="合同编号:"> |
|||
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<div class="searchbtns"> |
|||
<el-button type="primary" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" @click="handresetting">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center"/> |
|||
<el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column label="车型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.modelName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
|
|||
export default { |
|||
name: "chexingbyconfiguration", |
|||
components: { |
|||
Pagination |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, |
|||
searchxianshitit: '隐藏查询条件', |
|||
tableKey: 0, |
|||
showbackState: 30, |
|||
sids: [], |
|||
list: [], |
|||
datalist: [], |
|||
number: '', |
|||
listLoading: false, |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
contractNo: '', |
|||
customerName: '' |
|||
}, |
|||
total: 1 |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
// 加载列表 |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
init() { |
|||
this.getList() |
|||
}, |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.configurationlistPage(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.code == '200') { |
|||
this.listQuery.total = response.data.total |
|||
this.list = response.data.records |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.getList() |
|||
}, |
|||
// 重置按钮 |
|||
handresetting() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
contractNo: '', |
|||
customerName: '' |
|||
}, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
handleSelectionChange(row) { |
|||
this.sids = [] |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push({ |
|||
modelName: element.modelName, |
|||
modelSid: element.modelSid, |
|||
configName: element.configName, |
|||
configurationItemsSid: element.configurationItemsSid |
|||
}) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
showData(value) { |
|||
if (value.length > 0){ |
|||
for (var i = 0; i < value.length; i++) { |
|||
this.datalist.push(value[i]) |
|||
} |
|||
} else { |
|||
this.datalist = [] |
|||
} |
|||
if (this.datalist.length > 0) { |
|||
for (var j = 0; j < this.datalist.length; j++) { |
|||
for (var k = 0; k < this.list.length; k++) { |
|||
if (this.datalist[j].vehicleName == this.list[k].modelName && this.datalist[j].configName == this.list[k].configName) { |
|||
this.$refs.multipleTable.toggleRowSelection(this.list[k], true) |
|||
} |
|||
} |
|||
} |
|||
} else { |
|||
this.$refs.multipleTable.clearSelection() |
|||
} |
|||
}, |
|||
// 添加修改返回 |
|||
AddUpdateReturn() { |
|||
if (this.sids.length > 0) { |
|||
this.$emit('backData', this.sids) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '请选择至少一条记录进行删除操作!', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
Loading…
Reference in new issue