Browse Source

开发厂家系统认款和调价管理的前端页面代码

master
yunuo970428 3 years ago
parent
commit
3ce79b62e3
  1. 2
      anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_chexing.vue
  2. 55
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  3. 346
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/tiaojiaguanli/tiaojiashenqingguanli/priceAdd.vue
  4. 160
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/tiaojiaguanli/tiaojiashenqingguanli/priceInfo.vue
  5. 345
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/tiaojiaguanli/tiaojiashenqingguanli/priceguanli.vue
  6. 327
      anrui-scm/anrui-scm-ui/src/views/supplychain/changjiaxitong/manufacturers.vue

2
anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_chexing.vue

@ -3,7 +3,7 @@
<el-upload class="upload-demo" :headers="accessToken" :action="uploadFile" :accept="accept" :data="uploadData"
:on-success="uploadImgSuccess_FuJian" :on-remove="handleRemove" :file-list="fileList_FuJian"
:on-preview="handlePictureCardPreview" :show-file-list="false">
<el-button size="small" type="primary">点击上传</el-button>
<el-button size="mini" type="primary">点击上传</el-button>
</el-upload>
</div>
</template>

55
anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js

@ -268,7 +268,6 @@ const codemenu = [
meta: { title: '采购退库' }
}]
},
{
path: '/vehicle',
component: Layout,
@ -286,19 +285,36 @@ const codemenu = [
]
},
{
path: '/baseoutsourcingapplication',
component: Layout,
// redirect: '/baseoutsourcingapplication/index',
meta: {
title: '车辆外采'
},
children: [
{
path: '/supplychain',
component: Layout,
redirect: '/supplychain/changjiaxitong',
meta: {
title: '车辆采购'
},
children: [
{
path: '/supplychain/changjiaxitong',
component: () => import('@/views/supplychain/changjiaxitong/manufacturers.vue'),
name: 'changjiaxitongrenkuan',
meta: { title: '厂家系统认款' }
}
]
},
{
path: '/baseoutsourcingapplication',
component: Layout,
// redirect: '/baseoutsourcingapplication/index',
meta: {
title: '车辆外采'
},
children: [
{
path: '/baseoutsourcingapplication/index',
component: () => import('@/views/baseoutsourcingapplication/baseoutsourcingapplication.vue'),
name: 'baseoutsourcingapplication',
meta: {title: '车辆外采'}
}]
name: 'baseoutsourcingapplication',
meta: { title: '车辆外采' }
}
]
},
{
path: '/examine',
@ -316,7 +332,20 @@ const codemenu = [
}
]
},
{
path: '/kucunguanli',
component: Layout,
redirect: '/kucunguanli/tiaojiaguanli',
meta: {
title: '库存管理'
},
children: [{
path: '/kucunguanli/tiaojiaguanli',
component: () => import('@/views/kucunguanli/tiaojiaguanli/tiaojiashenqingguanli/priceguanli.vue'),
name: 'priceguanli',
meta: { title: '调价申请管理' }
}]
},
// 入账管理
{
path: '/ruzhang',

346
anrui-scm/anrui-scm-ui/src/views/kucunguanli/tiaojiaguanli/tiaojiashenqingguanli/priceAdd.vue

@ -0,0 +1,346 @@
<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>
<el-col :span="4">
<span>调价申请日期:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.applicationDate }}</span>
</el-col>
<el-col :span="4">
<span>申请人:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.createByName }}</span>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="el-form-item-right">
<span>调价原因:</span>
</el-col>
<el-col :span="20">
<el-form-item>
<el-input v-model="formobj.remarks" clearable style="width: 30%"/>
</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="mini" icon="el-icon-plus" @click="addCommodity()">选择车型</el-button>
</div>
</div>
<el-table :key="tableKey" :data="formobj.busVehicleApplyDetailDtoList" :index="index" 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="100px" 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 prop="applyForDeposit" label="成本价" header-align="center" width="150">
<template slot-scope="scope" prop="applyForDeposit">
<el-input v-model="scope.row.applyForDeposit" placeholder="" @keyup.native="UpNumber" @keydown.native="UpNumber" 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="" @keyup.native="UpNumber" @keydown.native="UpNumber" class="addinputw" clearable/>
</template>
</el-table-column>
<el-table-column label="价格增减数额" header-align="center" width="200">
<template slot-scope="scope" prop="insideCode">
<el-input v-model="scope.row.insideCode" placeholder="" @keyup.native="UpNumber" @keydown.native="UpNumber" class="addinputw" clearable/>
</template>
</el-table-column>
<el-table-column label="备注" header-align="center" width="200">
<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>
<!--End 添加修改部分-->
<!--选择车型和常用配置-->
<configuration v-show="viewState == 2" ref="divconfiguration" @backData="backData" @doback="closePage"/>
</div>
</template>
<script>
import req from '@/api/supplychain/busvehicleapply'
import configuration from '@/views/supplychain/cheliangpaichan/chexingbyconfiguration'
export default {
name: 'priceAdd',
components: {
configuration
},
data() {
return {
viewTitle: '',
dialogStatus: '',
viewState: 1,
index: 0,
tableKey: 0,
list1: [],
//
formobj: {
sid: '', // sid
createBySid: window.sessionStorage.getItem('userSid'), // sid
createByName: window.sessionStorage.getItem('name'), //
applicationCode: '', //
applicationDate: '', //
schedulingType: '', //
remarks: '', //
currentAmount: '', //
busVehicleApplyDetailDtoList: []
},
rules: {},
submitdisabled: false
}
},
methods: {
//
newDate() {
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() + 1 //
let day = date.getDate() //
if (month < 10) {
month = '0' + month
}
if (day < 10) {
day = '0' + day
}
this.formobj.applicationDate = year + '-' + month + '-' + day
},
UpNumber(e) {
e.target.value = e.target.value.replace(/[^\d.-]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0.') // 0
e.target.value = e.target.value.replace(/\.{2,}/g, '.') // .
e.target.value = e.target.value.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/\-{2,}/g, '-') // -
e.target.value = e.target.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') //
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102
e.target.value = parseFloat(e.target.value)
}
},
//
addCommodity() {
this.viewState = 2
this.$refs['divconfiguration'].showData(this.list1)
},
//
dataDelete(index, row) {
this.formobj.busVehicleApplyDetailDtoList.splice(index, 1)
this.list1.splice(index, 1)
},
showAdd() {
this.newDate()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'add'
this.viewTitle = '【新增】车辆调价申请'
},
showEdit(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
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: '',
insideCode: e.insideCode, //
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.success) {
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() {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
this.handleReturn('true')
} 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')
},
closePage() {
this.viewState = 1
}
}
}
</script>
<style scoped>
.wlInfo {
text-align: center;
font-size: 28px;
line-height: 90px;
}
.tableStyle {
background-color: #FFFFFF;
display: flex;
justify-content: flex-start;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
/deep/ .el-col-4 {
text-align: right;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
/deep/ .el-col-8 {
text-align: left;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.icon {
color: #e84026;
margin-right: 4px;
}
</style>

160
anrui-scm/anrui-scm-ui/src/views/kucunguanli/tiaojiaguanli/tiaojiashenqingguanli/priceInfo.vue

@ -0,0 +1,160 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>车辆调价详情</div>
<!--start 添加修改按钮-->
<div>
<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>
<el-col :span="4">
<span>调价申请日期:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.applicationDate }}</span>
</el-col>
<el-col :span="4">
<span>申请人:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.createByName }}</span>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="el-form-item-right">
<span>调价原因:</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span style="margin-left: 5px">{{ formobj.remarks }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="tableStyle">
<div style="margin-left: 5px;font-weight: bold">车辆列表</div>
</div>
<el-table :key="tableKey" :data="formobj.busVehicleApplyDetailDtoList" :index="index" 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 prop="applyForDeposit" label="成本价" header-align="center" width="150">
<template slot-scope="scope" prop="applyForDeposit">
<span>{{ scope.row.vehicleName }}</span>
</template>
</el-table-column>
<el-table-column label="现销售指导价(万元)" header-align="center" width="150">
<template slot-scope="scope" prop="saleGuPrice">
<span>{{ scope.row.vehicleName }}</span>
</template>
</el-table-column>
<el-table-column label="价格增减数额" header-align="center" width="200">
<template slot-scope="scope" prop="insideCode">
<span>{{ scope.row.vehicleName }}</span>
</template>
</el-table-column>
<el-table-column label="备注" header-align="center" width="200">
<template slot-scope="scope" prop="remarks">
<span>{{ scope.row.vehicleName }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/supplychain/busvehicleapply'
export default {
name: 'priceInfo',
data() {
return {
dialogStatus: '',
index: 0,
tableKey: 0,
//
formobj: {
sid: '', // sid
createBySid: window.sessionStorage.getItem('userSid'), // sid
createByName: window.sessionStorage.getItem('name'), //
applicationCode: '', //
applicationDate: '', //
schedulingType: '', //
remarks: '', //
currentAmount: '', //
busVehicleApplyDetailDtoList: []
},
rules: {}
}
},
methods: {
showInfo(row) {
},
// ===
handleReturn() {
this.formobj.schedulingType = '' //
this.formobj.remarks = '' //
this.formobj.currentAmount = ''
this.formobj.applicationCode = ''
this.formobj.applicationDate = ''
this.formobj.busVehicleApplyDetailDtoList = []
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.wlInfo {
text-align: center;
font-size: 28px;
line-height: 90px;
}
.tableStyle {
background-color: #FFFFFF;
display: flex;
justify-content: flex-start;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
/deep/ .el-col-4 {
text-align: right;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
/deep/ .el-col-8 {
text-align: left;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
</style>

345
anrui-scm/anrui-scm-ui/src/views/kucunguanli/tiaojiaguanli/tiaojiashenqingguanli/priceguanli.vue

@ -0,0 +1,345 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="调价申请管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<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="申请日期">
<div class="block" style="float: left;">
<el-date-picker v-model="listQuery.params.warehousingStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</div>
<div style="float: left;margin: 0px 10px"></div>
<div class="block" style="float: left;">
<el-date-picker v-model="listQuery.params.warehousingEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</div>
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.mNum" placeholder="请输入车型" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">调价申请列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" 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="操作" width="150px" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" width="140px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehicleVersion }}</span>
</template>
</el-table-column>
<el-table-column label="申请日期" align="center" width="150px">
<template slot-scope="scope">
<span>{{ scope.row.engineTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="申请人" align="center" width="150px">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
</template>
</el-table-column>
<el-table-column label="调价原因" align="center" width="130px">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<priceAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<priceInfo v-show="viewState == 4" ref="divInfo" @doback="resetState"/>
</div>
</template>
<script>
import { pagerList } from '@/api/cheliang/basevehiclemodel'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import priceAdd from './priceAdd.vue'
import priceInfo from './priceInfo.vue'
import req from '@/api/anruiscm/scmmaterial'
export default {
name: 'priceguanli',
components: {
Pagination,
pageye,
ButtonBar,
priceAdd,
priceInfo
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'primary',
size: 'small',
icon: 'submit',
btnKey: 'doSubmit',
btnLabel: '提交'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
carBrand: '',
vehicleType: '',
productLine: '',
driveForm: '',
power: '',
vehicleVersion: '',
fuelType: '',
vehicleTypeCode: '',
gearboxType: '',
emissionStandard: '',
engineType: '',
marketSegments: '',
specifications: ''
},
current: 1,
size: 10,
total: 0
},
rules: {}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'toEdit':
this.toEdit()
break
case 'doDel':
this.doDel()
break
case 'doImport':
this.doImport()
break
case 'doExport':
this.doExport()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('sids', this.sids)
},
//
getList() {
this.listLoading = true
pagerList(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (
response.success &&
response.data &&
response.data.total > 0
) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
carBrand: '',
vehicleType: '',
productLine: '',
driveForm: '',
power: '',
vehicleVersion: '',
fuelType: '',
vehicleTypeCode: '',
gearboxType: '',
emissionStandard: '',
engineType: '',
marketSegments: '',
specifications: ''
},
current: 1,
size: 10,
total: 0
}
this.getList()
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd()
},
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
doDel() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids).then(resp => {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.loadList()
}).catch(e => {
loading.close()
})
}).catch(() => {
})
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.btn {
padding: 15px 0 15px 0;
border: 1px solid #e0e3eb;
}
.tab-header {
background-color: #edf1f7;
padding: 8px 20px;
margin-bottom: 0 !important;
}
.tab-header /deep/ .el-form-item {
margin-bottom: 10px;
}
.listtop {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
.tit {
margin-bottom: -10px;
}
.pagination {
margin-bottom: -10px;
}
</style>

327
anrui-scm/anrui-scm-ui/src/views/supplychain/changjiaxitong/manufacturers.vue

@ -0,0 +1,327 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div>
<button-bar view-title="厂家系统认款" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<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-select v-model="listQuery.params.vehicleType" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in vehicleFunction_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="打款状态">
<el-select v-model="listQuery.params.productLine" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in productLine_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="入库时间">
<div class="block" style="float: left;">
<el-date-picker v-model="listQuery.params.warehousingStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</div>
<div style="float: left;margin: 0px 10px"></div>
<div class="block" style="float: left;">
<el-date-picker v-model="listQuery.params.warehousingEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</div>
</el-form-item>
<el-form-item label="排产申请编号">
<el-input v-model="listQuery.params.mNum" placeholder="请输入排产申请编号" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;">
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="操作" width="100px" align="center">
<template slot-scope="scope">
<el-button type="success" size="mini">通过</el-button>
</template>
</el-table-column>
<el-table-column label="状态" width="140px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehicleVersion }}</span>
</template>
</el-table-column>
<el-table-column label="排产申请编号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.engineTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="打款状态" align="center" width="150px">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
</template>
</el-table-column>
<el-table-column label="认款日期" align="center" width="180px">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
</template>
</el-table-column>
<el-table-column label="认款人" align="center" width="130px">
<template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span>
</template>
</el-table-column>
<el-table-column label="见证材料" align="center" width="180px" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="handleGetCheck(scope.row)">查看</el-button>
<div class="upload_img">
<upload ref="uploadMoreImg" v-model="imgList" :limit="1" bucket="map" @eett="getList" :upload-data="{type:'0001',modelSid: scope.row.sid}"></upload>
</div>
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.remarks" clearable></el-input>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<!-- End 列表页面 -->
<!-- 照片弹窗 -->
<el-dialog title="查看" :visible.sync="dialogImgVisible">
<el-image v-for="item in srcList" style="width: 100px; height: 100px" :src="item" :preview-src-list="srcList"></el-image>
</el-dialog>
</div>
</template>
<script>
import { pagerList, pullDown } from '@/api/cheliang/basevehiclemodel'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import upload from '@/components/uploadFile/upload_chexing'
export default {
name: 'changjiaxitongrenkuan',
components: {
Pagination,
pageye,
upload,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
dialogImgVisible: false,
// -----------
tableKey: 0,
list: [],
srcList: [],
vehicleFunction_list: [], //
productLine_list: [], //
FormLoading: false,
listLoading: false,
listQuery: {
params: {
carBrand: '',
vehicleType: '',
productLine: '',
driveForm: '',
power: '',
vehicleVersion: '',
fuelType: '',
vehicleTypeCode: '',
gearboxType: '',
emissionStandard: '',
engineType: '',
marketSegments: '',
specifications: ''
},
current: 1,
size: 10,
total: 0
},
imgList: [],
rules: {}
}
},
created() {
//
this.init()
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'toEdit':
this.toEdit()
break
case 'doDel':
this.doDel()
break
case 'doImport':
this.doImport()
break
case 'doExport':
this.doExport()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
init() {
// -
pullDown({
type: 'vehicleFunction'
}).then((res) => {
if (res.code === '200') {
this.vehicleFunction_list = res.data
console.log('下拉框请求功能', res.data)
}
})
// -
pullDown({
type: 'driver'
}).then((res) => {
if (res.code === '200') {
this.driveForm_list = res.data
console.log('下拉框请求驱动', res.data)
}
})
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
pagerList(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (
response.code === '200' &&
response.data &&
response.data.total > 0
) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
carBrand: '',
vehicleType: '',
productLine: '',
driveForm: '',
power: '',
vehicleVersion: '',
fuelType: '',
vehicleTypeCode: '',
gearboxType: '',
emissionStandard: '',
engineType: '',
marketSegments: '',
specifications: ''
},
current: 1,
size: 10,
total: 0
}
this.getList()
},
handleGetCheck(row) {
this.dialogImgVisible = true
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.upload_img {
display: inline-block;
padding-left: 10px;
}
.btn {
padding: 15px 0 15px 0;
border: 1px solid #e0e3eb;
}
.tab-header {
background-color: #edf1f7;
padding: 8px 20px;
margin-bottom: 0 !important;
}
.tab-header /deep/ .el-form-item {
margin-bottom: 10px;
}
.listtop {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
.tit {
margin-bottom: -10px;
}
.pagination {
margin-bottom: -10px;
}
</style>
Loading…
Cancel
Save