
7 changed files with 822 additions and 106 deletions
@ -0,0 +1,382 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<!--查询和其列表部分--> |
||||
|
<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="isSearchShow = !isSearchShow"> |
||||
|
{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }} |
||||
|
</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
<el-form-item label="最新盘库日期"> |
||||
|
<el-date-picker v-model="listQuery.params.inspectedStartDate" class="filter-item" type="date" |
||||
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/> |
||||
|
<label>至</label> |
||||
|
<el-date-picker v-model="listQuery.params.inspectedEndDate" class="filter-item" type="date" |
||||
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="车架号"> |
||||
|
<el-input v-model="listQuery.params.vin" placeholder="请输入车架号" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="合格证编号"> |
||||
|
<el-input v-model="listQuery.params.vin" placeholder="请输入合格证编号" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="存放地点"> |
||||
|
<el-select v-model="listQuery.params.location" class="addinputw" clearable placeholder="请选择"> |
||||
|
<el-option v-for="(item,index) in location_list" :key="item.sid" :label="item.warehouseName" |
||||
|
:value="item.sid"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态"> |
||||
|
<el-select v-model="listQuery.params.InventoryState" class="addinputw" placeholder="请选择" clearable> |
||||
|
<el-option v-for="item in stateType_list" :key="item.dictKey" :label="item.dictValue" |
||||
|
:value="item.dictValue" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn"> |
||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="getList">查询</el-button> |
||||
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--Start 项目列表头部--> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">合格证盘点记录列表</div> |
||||
|
<pageye v-show="dataList.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
||||
|
:limit.sync="listQuery.size" class="pagination" @pagination="loadList"/> |
||||
|
</div> |
||||
|
<!--End 项目列表头部--> |
||||
|
<!--Start 项目列表--> |
||||
|
<div class=""> <!--@selection-change="handleSelectionChange"--> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"> |
||||
|
<!-- <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" width="130px" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="{row}"> |
||||
|
<!-- :disabled="row.state == '待提交' ? false:row.state == '移库申请'?false : true" --> |
||||
|
<el-button size="mini" type="primary" |
||||
|
@click="handleEdit(row)">办理 |
||||
|
</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column width="200px" prop="vin" label="合格证编号" align="center"/> |
||||
|
<el-table-column width="200px" prop="vin" label="车架号" align="center"/> |
||||
|
<el-table-column prop="model" label="最新盘库日期" align="center"/> |
||||
|
<el-table-column width="160px" prop="purchaseType" label="最新存放地点" align="center"/> |
||||
|
<el-table-column width="140px" prop="dispatchedDate" label="最新盘库人员" align="center"/> |
||||
|
<el-table-column width="140px" prop="inspectedDate" label="状态" align="center"/> |
||||
|
<el-table-column width="140px" prop="inspectedName" label="备注" align="center"/> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!--End 项目列表--> |
||||
|
<div class="pages"> |
||||
|
<div class="tit"/> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination |
||||
|
v-show="dataList.length > 0" |
||||
|
:total="listQuery.total" |
||||
|
:page.sync="listQuery.current" |
||||
|
:limit.sync="listQuery.size" |
||||
|
class="pagination" |
||||
|
@pagination="loadList" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--办理--> |
||||
|
<el-dialog center :visible.sync="dialogVisible" width="70%"> |
||||
|
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
||||
|
<el-row style="border-top: 1px solid #E0E3EB"> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty spanOneWidth"><span>合格证编码</span></div> |
||||
|
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.mainSid }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty spanOneWidth"><span>车架号</span></div> |
||||
|
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.mainSid }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<!-- <el-col :span="12">--> |
||||
|
<!-- <div class="span-sty spanOneWidth"><span>合格证</span></div>--> |
||||
|
<!-- <el-form-item>--> |
||||
|
<!-- <el-select v-model="formobj.certificate" class="addinputw addinputwOne" placeholder="请选择" style="width: 30%" @change="changeCertificateType(scope.row,this)" clearable>--> |
||||
|
<!-- <el-option v-for="item in certificateType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>--> |
||||
|
<!-- </el-select>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- </el-col>--> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty spanOneWidth"><span>盘库日期</span></div> |
||||
|
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.InventoryDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty spanOneWidth"><span>存放地点</span></div> |
||||
|
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.location }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty spanOneWidth"><span>盘库人员</span></div> |
||||
|
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.inventoryName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty spanOneWidth"><span>状态</span></div> |
||||
|
<el-form-item> |
||||
|
<el-select v-model="formobj.InventoryState" class="addinputw addinputwOne" placeholder="请选择" |
||||
|
style="width: 30%" @change="changeStateType(scope.row,this)" clearable> |
||||
|
<el-option v-for="item in stateType_list" :key="item.dictKey" :label="item.dictValue" |
||||
|
:value="item.dictValue"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty spanOneWidth"><span>备注</span></div> |
||||
|
<el-form-item> |
||||
|
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputwOne" |
||||
|
style="width: 80% !important; " clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="handleQueDing">确 定</el-button> |
||||
|
<el-button @click="dialogVisible = false">取 消</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
<!--新增修改部分组件--> |
||||
|
<hegezhengpandianjilu-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" |
||||
|
@reloadlist="getList"/> |
||||
|
<!--详情部分组件--> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { selectCarInspectedList, typeValues } from '@/api/supplychain/yancheguanli' |
||||
|
import { getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel' |
||||
|
import { fetchByUseOrgSid } from '@/api/cheliang/dictcommons' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import hegezhengpandianjiluAdd from '@/views/supplychain/hegezhengpandianjilu/hegezhengpandianjiluAdd' |
||||
|
|
||||
|
export default { |
||||
|
name: 'hegezhengpandianjilu', |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
hegezhengpandianjiluAdd |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
tableLoading: false, |
||||
|
dialogVisible: false, |
||||
|
formobj: {}, |
||||
|
stateType_list: [ |
||||
|
{ |
||||
|
dictKey: 1, |
||||
|
dictValue: '通过' |
||||
|
}, |
||||
|
{ |
||||
|
dictKey: 2, |
||||
|
dictValue: '不通过' |
||||
|
} |
||||
|
], |
||||
|
dataList: [], |
||||
|
useOrg_list: [], |
||||
|
purchaseType_list: [], |
||||
|
location_list: [], |
||||
|
useOrg: '', // 使用组织 |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
vin: '', |
||||
|
model: '', |
||||
|
purchaseType: '', |
||||
|
inspectedStartDate: '', |
||||
|
inspectedEndDate: '', |
||||
|
userSid: window.sessionStorage.getItem('userSid') |
||||
|
} |
||||
|
}, |
||||
|
btnList: [ |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: '', |
||||
|
btnKey: 'generatedRecords', |
||||
|
btnLabel: '生成盘点记录' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: '', |
||||
|
btnKey: 'doCheck', |
||||
|
btnLabel: '盘点' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
multipleSelection: [] |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getType() |
||||
|
this.getPathSid() |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
methods: { |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
getType() { |
||||
|
typeValues({ |
||||
|
type: 'purchaseOrderType ' |
||||
|
}).then((response) => { |
||||
|
if (response.code === '200' && response.data) { |
||||
|
// this.purchaseType_list = response.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getPathSid() { |
||||
|
const userSid = window.sessionStorage.getItem('userSid') |
||||
|
getPathSidByUserSid({ userSid: userSid }).then((res) => { |
||||
|
if (res.code === '200') { |
||||
|
this.listQuery.params.createOrgSid = res.data |
||||
|
this.useOrg = res.data |
||||
|
this.getList() |
||||
|
this.getLocation(res.data) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 根据组织获得存放地点 |
||||
|
getLocation(useOrg) { |
||||
|
// 存放地点 |
||||
|
fetchByUseOrgSid({ |
||||
|
sid: useOrg |
||||
|
}).then((res) => { |
||||
|
if (res.code === '200') { |
||||
|
this.location_list = res.data |
||||
|
console.log('存放地点', this.location_list) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
||||
|
switch (btnKey) { |
||||
|
case 'generatedRecords': |
||||
|
this.generatedRecords() |
||||
|
break |
||||
|
case 'doCheck': |
||||
|
this.doCheck() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
generatedRecords() { |
||||
|
|
||||
|
}, |
||||
|
doCheck() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd(this.useOrg) |
||||
|
}, |
||||
|
handleEdit(row) { |
||||
|
this.formobj = row |
||||
|
this.dialogVisible = true |
||||
|
}, |
||||
|
getList() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.listQuery = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
vin: '', |
||||
|
model: '', |
||||
|
purchaseType: '', |
||||
|
inspectedStartDate: '', |
||||
|
inspectedEndDate: '', |
||||
|
userSid: window.sessionStorage.getItem('userSid') |
||||
|
} |
||||
|
} |
||||
|
this.getPathSid() |
||||
|
}, |
||||
|
loadList() { |
||||
|
const _this = this |
||||
|
this.tableLoading = true |
||||
|
selectCarInspectedList(this.listQuery) |
||||
|
.then(resp => { |
||||
|
_this.tableLoading = false |
||||
|
const data = resp.data |
||||
|
_this.listQuery.total = data.total |
||||
|
_this.dataList = data.records |
||||
|
for (var i = 0; i < this.dataList.length; i++) { |
||||
|
if (this.dataList[i].inspectedType == '1') { |
||||
|
this.dataList[i].inspectedType = '待验车' |
||||
|
} else { |
||||
|
this.dataList[i].inspectedType = '已验车' |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
_this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 办理确定 |
||||
|
handleQueDing() { |
||||
|
updateState(this.formobj).then((res) => { |
||||
|
this.dialogVisible = false |
||||
|
if (res.success) { |
||||
|
this.$message({ showClose: true, type: 'success', message: res.msg }) |
||||
|
this.getList() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.spanOneWidth { |
||||
|
width: 110px !important; |
||||
|
} |
||||
|
|
||||
|
.addinputwOne { |
||||
|
margin-left: 110px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,299 @@ |
|||||
|
<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="titwu"><span>合格证盘点操作</span></div> |
||||
|
<el-form ref="form_obj" :model="listQuery" :rules="rules" class="formadd"> |
||||
|
<div class="spe_style"> |
||||
|
<el-form-item label="盘点人员"> |
||||
|
<el-select v-model="listQuery.params.inventoryName" placeholder="请选择" filterable |
||||
|
@change="changeInventoryName" clearable class="addinputwOne"> |
||||
|
<el-option v-for="item in staff_list" :key="item.sid" :label="item.namePath" |
||||
|
:value="item.sid"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
<el-form-item label="车架号"> |
||||
|
<el-input v-model="listQuery.params.vin" placeholder="请输入车架号" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="合格证编号"> |
||||
|
<el-input v-model="listQuery.params.vin" placeholder="请输入合格证编号" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn"> |
||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="getList">查询</el-button> |
||||
|
</div> |
||||
|
<div class="title"> |
||||
|
<div>库存车辆列表</div> |
||||
|
</div> |
||||
|
<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="primary" size="mini" @click="handleAffirm(scope.row)">确认</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车架号" width="140px" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.mainSid }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="合格证" width="150" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-select v-model="scope.row.certificate" placeholder="请选择" style="width: 80%" |
||||
|
@change="changeCertificateType(scope.row,this)" clearable> |
||||
|
<el-option v-for="item in certificateType_list" :key="item.dictKey" :label="item.dictValue" |
||||
|
:value="item.dictValue"></el-option> |
||||
|
</el-select> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="存放地点" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.location }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="上次盘库日期" align="center" width="150px"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.lastDate }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="上次盘库人员" align="center" width="150px"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.lastName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="状态" width="150" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-select v-model="scope.row.InventoryState" placeholder="请选择" style="width: 80%" |
||||
|
@change="changeStateType(scope.row,this)" clearable> |
||||
|
<el-option v-for="item in stateType_list" :key="item.dictKey" :label="item.dictValue" |
||||
|
:value="item.dictValue"></el-option> |
||||
|
</el-select> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="备注" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input v-model="scope.row.remarks" placeholder="" clearable></el-input> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/kucunguanli/panku' |
||||
|
import { fetchByUseOrgSid, getUserByOrgSid, typeValues } from '@/api/cheliang/dictcommons' |
||||
|
|
||||
|
export default { |
||||
|
name: 'hegezhengpandianjiluAdd', |
||||
|
data() { |
||||
|
return { |
||||
|
listLoading: false, |
||||
|
viewState: 1, |
||||
|
index: 0, |
||||
|
tableKey: 0, |
||||
|
list: [], |
||||
|
warehouse_list: [], |
||||
|
staff_list: [], |
||||
|
certificateType_list: [], |
||||
|
stateType_list: [ |
||||
|
{ |
||||
|
dictKey: 1, |
||||
|
dictValue: '通过' |
||||
|
}, |
||||
|
{ |
||||
|
dictKey: 2, |
||||
|
dictValue: '不通过' |
||||
|
} |
||||
|
], |
||||
|
// 表单数据 |
||||
|
temp: { |
||||
|
sid: '', |
||||
|
mainSid: '', |
||||
|
location: '', |
||||
|
lastData: '', |
||||
|
lastName: '', |
||||
|
inventoryName: '', |
||||
|
inventorySid: '', |
||||
|
certificate: '', |
||||
|
certificateKey: '', |
||||
|
InventoryState: '', |
||||
|
InventoryStateKey: '', |
||||
|
remarks: '', |
||||
|
loginName: window.sessionStorage.getItem('name'), |
||||
|
loginSid: window.sessionStorage.getItem('userSid') |
||||
|
}, |
||||
|
listQuery: { |
||||
|
params: { |
||||
|
locationSid: '', |
||||
|
mainSid: '', |
||||
|
createOrgSid: '' |
||||
|
}, |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0 |
||||
|
}, |
||||
|
rules: {}, |
||||
|
submitdisabled: false |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init() { |
||||
|
getUserByOrgSid({ |
||||
|
orgSid: this.listQuery.params.createOrgSid, |
||||
|
userSid: window.sessionStorage.getItem('userSid') |
||||
|
}).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.staff_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
fetchByUseOrgSid({ sid: this.listQuery.params.createOrgSid }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.warehouse_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
typeValues({ type: 'certificate' }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.certificateType_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
this.getList() |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
showAdd(createOrgSid) { |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
this.listQuery.params.createOrgSid = createOrgSid |
||||
|
this.init() |
||||
|
}, |
||||
|
getList() { |
||||
|
req.pagelist(this.listQuery).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.list = res.data.records |
||||
|
} else { |
||||
|
this.list = [] |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleSelect() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
changeLocation(value) { |
||||
|
this.listQuery.params.locationSid = value |
||||
|
this.getList() |
||||
|
}, |
||||
|
changeStateType(row) { |
||||
|
let bb = null |
||||
|
this.stateType_list.forEach((e) => { |
||||
|
if (e.dictValue === row.InventoryState) { |
||||
|
bb = { |
||||
|
key: e.dictKey, |
||||
|
value: e.dictValue |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
row.InventoryStateKey = bb.key |
||||
|
}, |
||||
|
changeCertificateType(row) { |
||||
|
let bb = null |
||||
|
this.certificateType_list.forEach((e) => { |
||||
|
if (e.dictValue === row.certificate) { |
||||
|
bb = { |
||||
|
key: e.dictKey, |
||||
|
value: e.dictValue |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
row.certificateKey = bb.key |
||||
|
}, |
||||
|
changeInventoryName(value) { |
||||
|
let bb = null |
||||
|
this.staff_list.forEach((e) => { |
||||
|
if (e.sid === value) { |
||||
|
bb = { |
||||
|
name: e.name, |
||||
|
sid: e.sid |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
this.listQuery.params.inventoryName = bb.name |
||||
|
this.temp.inventoryName = bb.name |
||||
|
this.temp.inventorySid = bb.sid |
||||
|
}, |
||||
|
handleAffirm(row) { |
||||
|
this.temp.sid = row.sid |
||||
|
this.temp.mainSid = row.mainSid |
||||
|
this.temp.location = row.location |
||||
|
this.temp.certificate = row.certificate |
||||
|
this.temp.certificateKey = row.certificateKey |
||||
|
this.temp.InventoryState = row.InventoryState |
||||
|
this.temp.InventoryStateKey = row.InventoryStateKey |
||||
|
this.temp.remarks = row.remarks |
||||
|
console.log(this.temp) |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.saveInventory(this.temp).then((resp) => { |
||||
|
this.submitdisabled = false |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: resp.msg |
||||
|
}) |
||||
|
this.getList() |
||||
|
// this.handleReturn('true') |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} else { |
||||
|
return false |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 返回(===既判断) |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
// 表单数据 |
||||
|
this.$refs['form_obj'].resetFields() |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.formadd .btn { |
||||
|
padding: 5px 0; |
||||
|
border: 1px solid #e0e3eb; |
||||
|
text-align: center; |
||||
|
margin-bottom: 5px; |
||||
|
} |
||||
|
|
||||
|
.spe_style{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
</style> |
Loading…
Reference in new issue