|
|
@ -3,65 +3,40 @@ |
|
|
|
<div v-show="viewState === 1"> |
|
|
|
<button-bar view-title="其他入库单" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|
|
|
<div class="searchcon"> |
|
|
|
<el-button size="small" class="searchbtn" @click="isSearchShow = !isSearchShow">{{ isSearchShow ? '隐藏查询条件' : |
|
|
|
'显示查询条件' }} |
|
|
|
</el-button> |
|
|
|
<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-input v-model="queryParams.params.billNo" placeholder="请输入单据编号" clearable/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="单据类型"> |
|
|
|
<el-select v-model="queryParams.params.billType" @change="changeBillType" style="width:200px" |
|
|
|
filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in billType_list" :key="item.dictKey" :label="item.dictValue" |
|
|
|
:value="item.dictKey"></el-option> |
|
|
|
<el-select v-model="queryParams.params.billType" @change="changeBillType" style="width:200px" filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in billType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|
|
|
</el-select> |
|
|
|
<!-- <el-input v-model="queryParams.params.billType" placeholder="请输入单据类型" clearable/>--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="供应商" class="search_label"> |
|
|
|
<el-select v-model="queryParams.params.manufacturerName" @change="changeManu" style="width:200px" |
|
|
|
filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in manu_list" :key="item.sid" :label="item.manufacturerName" |
|
|
|
:value="item.sid"></el-option> |
|
|
|
<el-select v-model="queryParams.params.manufacturerName" @change="changeManu" style="width:200px" filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in manu_list" :key="item.sid" :label="item.manufacturerName" :value="item.sid"></el-option> |
|
|
|
</el-select> |
|
|
|
<!-- <el-input v-model="queryParams.params.manufacturerName" placeholder="请输入供应商" clearable/>--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户" class="search_label"> |
|
|
|
<el-select v-model="queryParams.params.customer" @change="changeCustomer" style="width:200px" |
|
|
|
filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in customer_list" :key="item.sid" :label="item.customerName" |
|
|
|
:value="item.sid"></el-option> |
|
|
|
<el-select v-model="queryParams.params.customer" @change="changeCustomer" style="width:200px" filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in customer_list" :key="item.sid" :label="item.name" :value="item.sid"></el-option> |
|
|
|
</el-select> |
|
|
|
<!-- <el-input v-model="queryParams.params.customer" placeholder="请输入客户" clearable/>--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="货主" class="search_label"> |
|
|
|
<el-input v-model="queryParams.params.cargoOwner" placeholder="请输入货主" clearable/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="货主类型"> |
|
|
|
<el-select v-model="queryParams.params.cargoOwnerType" @change="changeCargoType" style="width:200px" |
|
|
|
filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in cargoType_list" :key="item.dictKey" :label="item.dictValue" |
|
|
|
:value="item.dictKey"></el-option> |
|
|
|
<el-select v-model="queryParams.params.cargoOwnerType" @change="changeCargoType" style="width:200px" filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in cargoType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|
|
|
</el-select> |
|
|
|
<!-- <el-input v-model="queryParams.params.cargoOwnerType" placeholder="请输入货主类型" clearable/>--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="单据状态"> |
|
|
|
<el-select v-model="queryParams.params.billState" @change="changeBillState" style="width:200px" |
|
|
|
filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in billState_list" :key="item.dictKey" :label="item.dictValue" |
|
|
|
:value="item.dictKey"></el-option> |
|
|
|
<el-select v-model="queryParams.params.billState" @change="changeBillState" style="width:200px" filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in billState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|
|
|
</el-select> |
|
|
|
<!-- <el-input v-model="queryParams.params.billState" placeholder="请输入单据状态" clearable/>--> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label="验收员" class="search_label">--> |
|
|
|
<!-- <el-select v-model="queryParams.params.inspectorName" @change="changeInspectorName" style="width:200px"--> |
|
|
|
<!-- filterable placeholder="请选择">--> |
|
|
|
<!-- <el-option v-for="item in Inspector_list" :key="item.dictKey" :label="item.dictValue"--> |
|
|
|
<!-- :value="item.dictKey"></el-option>--> |
|
|
|
<!-- </el-select>--> |
|
|
|
<!-- <el-input v-model="queryParams.params.inspectorName" placeholder="请输入验收员" clearable/>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<el-divider/> |
|
|
|
<div class="btn" style="text-align: center;"> |
|
|
|
<el-button type="primary" @click="dosearch">查询</el-button> |
|
|
@ -73,24 +48,13 @@ |
|
|
|
<!--Start 项目列表头部--> |
|
|
|
<div class="listtop"> |
|
|
|
<div class="tit">其他入库单列表</div> |
|
|
|
<pageye |
|
|
|
v-show="dataList.length > 0" |
|
|
|
:total="queryParams.total" |
|
|
|
:page.sync="queryParams.current" |
|
|
|
:limit.sync="queryParams.size" |
|
|
|
class="pagination" |
|
|
|
@pagination="loadList"/> |
|
|
|
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/> |
|
|
|
</div> |
|
|
|
<!--End 项目列表头部--> |
|
|
|
|
|
|
|
<!--Start 项目列表--> |
|
|
|
<div class="listcon"> |
|
|
|
<el-table |
|
|
|
v-loading="tableLoading" |
|
|
|
:data="dataList" |
|
|
|
border |
|
|
|
style="width: 100%" |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table v-loading="tableLoading" :data="dataList" 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 prop="billNo" label="单据编号" align="center"> |
|
|
@ -112,14 +76,7 @@ |
|
|
|
<div class="pages"> |
|
|
|
<div class="tit"/> |
|
|
|
<!-- 翻页 --> |
|
|
|
<pagination |
|
|
|
v-show="dataList.length > 0" |
|
|
|
:total="queryParams.total" |
|
|
|
:page.sync="queryParams.current" |
|
|
|
:limit.sync="queryParams.size" |
|
|
|
class="pagination" |
|
|
|
@pagination="loadList" |
|
|
|
/> |
|
|
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!--End 查询和其列表部分--> |
|
|
@ -133,432 +90,412 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/anruiscm/scmotherinbound' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import divAdd from './scmotherinboundAdd' |
|
|
|
import divInfo from './scmotherinboundInfo' |
|
|
|
import { setuser, getuser } from '@/utils/baocun' |
|
|
|
import req from '@/api/anruiscm/scmotherinbound' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import divAdd from './scmotherinboundAdd' |
|
|
|
import divInfo from './scmotherinboundInfo' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'ScmOtherInboundIndex', |
|
|
|
components: { |
|
|
|
ButtonBar, |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
divAdd, |
|
|
|
divInfo |
|
|
|
export default { |
|
|
|
name: 'ScmOtherInboundIndex', |
|
|
|
components: { |
|
|
|
ButtonBar, |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
divAdd, |
|
|
|
divInfo |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
btndisabled: false, |
|
|
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|
|
|
isSearchShow: false, // 显示隐藏 |
|
|
|
tableLoading: false, |
|
|
|
// 下拉框 |
|
|
|
billType_list: [], // 单据类型 |
|
|
|
manu_list: [], // 供应商 |
|
|
|
customer_list: [], // 客户 |
|
|
|
cargoType_list: [], // 货主类型 |
|
|
|
billState_list: [], // 单据状态 |
|
|
|
// Inspector_list: [], // 验收员 |
|
|
|
// 列表数据 |
|
|
|
dataList: [], |
|
|
|
// sid数组 |
|
|
|
sids: [], // 用于导出的时候保存已选择SID |
|
|
|
sides: '', // 一条数据的sid |
|
|
|
queryParams: { |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
billNo: '', // 单据编号 |
|
|
|
billType: '', // 单据类型 |
|
|
|
manufacturerName: '', // 供应商 |
|
|
|
cargoOwnerType: '', // 货主类型 |
|
|
|
orgName: '', // 部门 |
|
|
|
cargoOwner: '', // 货主 |
|
|
|
inspectorName: '', // 验收员 |
|
|
|
billState: '', // 单据状态 |
|
|
|
customer: '', // 客户 |
|
|
|
date: '', // 日期 |
|
|
|
remarks: '' // 备注 |
|
|
|
} |
|
|
|
}, |
|
|
|
row: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.loadList() |
|
|
|
// 下拉框 |
|
|
|
this.getBillType() // 单据类型 |
|
|
|
this.getManu() // 供应商 可搜索 |
|
|
|
this.getCustomer() // 客户 可搜索 |
|
|
|
this.getCargoType() // 货主类型 |
|
|
|
this.getBillState() // 单据状态 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
btndisabled: false, |
|
|
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|
|
|
isSearchShow: false, // 显示隐藏 |
|
|
|
tableLoading: false, |
|
|
|
//下拉框 |
|
|
|
billType_list: [], //单据类型 |
|
|
|
manu_list: [], //供应商 |
|
|
|
customer_list: [], //客户 |
|
|
|
cargoType_list: [], // 货主类型 |
|
|
|
billState_list: [], // 单据状态 |
|
|
|
// Inspector_list: [], // 验收员 |
|
|
|
// 列表数据 |
|
|
|
dataList: [], |
|
|
|
// sid数组 |
|
|
|
sids: [], // 用于导出的时候保存已选择SID |
|
|
|
sides: '', // 一条数据的sid |
|
|
|
queryParams: { |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
billNo: '', // 单据编号 |
|
|
|
billType: '', // 单据类型 |
|
|
|
manufacturerName: '', // 供应商 |
|
|
|
cargoOwnerType: '', // 货主类型 |
|
|
|
orgName: '', // 部门 |
|
|
|
cargoOwner: '', // 货主 |
|
|
|
inspectorName: '', // 验收员 |
|
|
|
billState: '', // 单据状态 |
|
|
|
customer: '', // 客户 |
|
|
|
date: '', // 日期 |
|
|
|
remarks: '' // 备注 |
|
|
|
} |
|
|
|
}, |
|
|
|
row: {} |
|
|
|
btnHandle(btnKey) { |
|
|
|
console.log('XXXXXXXXXXXXXXX' + btnKey) |
|
|
|
switch (btnKey) { |
|
|
|
case 'toAdd': |
|
|
|
this.toAdd() |
|
|
|
break |
|
|
|
case 'toEdit': |
|
|
|
this.toEdit() |
|
|
|
break |
|
|
|
case 'doSubmit': |
|
|
|
this.doSubmit() |
|
|
|
break |
|
|
|
case 'doDel': |
|
|
|
this.doDel() |
|
|
|
break |
|
|
|
case 'doImport': |
|
|
|
this.doImport() |
|
|
|
break |
|
|
|
case 'doExport': |
|
|
|
this.doExport() |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.loadList() |
|
|
|
//下拉框 |
|
|
|
this.getBillType() // 单据类型 |
|
|
|
this.getManu() // 供应商 可搜索 |
|
|
|
this.getCustomer() //客户 可搜索 |
|
|
|
this.getCargoType() // 货主类型 |
|
|
|
this.getBillState() // 单据状态 |
|
|
|
|
|
|
|
// 获取数据sid |
|
|
|
handleSelectionChange(row) { |
|
|
|
console.log('aaa', row) |
|
|
|
const aa = [] |
|
|
|
row.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
this.row = row |
|
|
|
this.sides = this.sids.join() // 将sid数组的元素转化成字符串 |
|
|
|
console.log('获取sids数组', this.sids) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
btnHandle(btnKey) { |
|
|
|
console.log('XXXXXXXXXXXXXXX' + btnKey) |
|
|
|
switch (btnKey) { |
|
|
|
case 'toAdd': |
|
|
|
this.toAdd() |
|
|
|
break |
|
|
|
case 'toEdit': |
|
|
|
this.toEdit() |
|
|
|
break |
|
|
|
case 'doSubmit': |
|
|
|
this.doSubmit() |
|
|
|
break |
|
|
|
case 'doDel': |
|
|
|
this.doDel() |
|
|
|
break |
|
|
|
case 'doImport': |
|
|
|
this.doImport() |
|
|
|
break |
|
|
|
case 'doExport': |
|
|
|
this.doExport() |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取数据sid |
|
|
|
handleSelectionChange(row) { |
|
|
|
console.log('aaa', row) |
|
|
|
const aa = [] |
|
|
|
row.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
|
setuser(this.sids) |
|
|
|
toAdd(row) { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divadd'].showAdd() |
|
|
|
}, |
|
|
|
toEdit() { |
|
|
|
if (this.sids.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.sids.length > 1) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.viewState = 3 |
|
|
|
const sid = this.sids[0] |
|
|
|
const row = this.row |
|
|
|
this.$refs['divadd'].showEdit(sid, row) |
|
|
|
}, |
|
|
|
doSubmit(row) { |
|
|
|
// 提交的代码 |
|
|
|
this.btndisabled = true |
|
|
|
req |
|
|
|
.doSubmit(this.queryParams.params, this.sids) |
|
|
|
.then(resp => { |
|
|
|
console.log(resp) |
|
|
|
this.btndisabled = false |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
this.row = row |
|
|
|
this.sides = this.sids.join() //将sid数组的元素转化成字符串 |
|
|
|
console.log('获取sids数组', this.sids) |
|
|
|
}, |
|
|
|
|
|
|
|
toAdd(row) { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divadd'].showAdd() |
|
|
|
}, |
|
|
|
toEdit() { |
|
|
|
if (this.sids.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.sids.length > 1) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.viewState = 3 |
|
|
|
const sid = this.sids[0] |
|
|
|
const row = this.row |
|
|
|
this.$refs['divadd'].showEdit(sid, row) |
|
|
|
}, |
|
|
|
doSubmit(row) { |
|
|
|
// 提交的代码 |
|
|
|
this.btndisabled = true |
|
|
|
req |
|
|
|
.doSubmit(this.queryParams.params, this.sids) |
|
|
|
.then(resp => { |
|
|
|
console.log(resp) |
|
|
|
this.btndisabled = false |
|
|
|
.catch(() => { |
|
|
|
this.btndisabled = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
doDel(row) { |
|
|
|
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)' |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.btndisabled = false |
|
|
|
const _this = this |
|
|
|
req.delBySids(this.sids).then(resp => { |
|
|
|
loading.close() |
|
|
|
_this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|
|
|
_this.loadList() |
|
|
|
}) |
|
|
|
}, |
|
|
|
doDel(row) { |
|
|
|
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)' |
|
|
|
}) |
|
|
|
const _this = this |
|
|
|
req.delBySids(this.sids).then(resp => { |
|
|
|
.catch(e => { |
|
|
|
loading.close() |
|
|
|
_this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|
|
|
_this.loadList() |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
doImport(row) { |
|
|
|
// 导入的代码 |
|
|
|
req |
|
|
|
.importExcel(this.queryParams.params, this.sids) |
|
|
|
.then(resp => { |
|
|
|
console.log(resp) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
doExport(sids) { |
|
|
|
// 导出的代码 |
|
|
|
req |
|
|
|
.exportExcel(this.queryParams.params, this.sids) |
|
|
|
.then(resp => { |
|
|
|
var map = resp.data |
|
|
|
const fileName = map.filename // 导出文件名 |
|
|
|
// // 对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性 |
|
|
|
// // IE10以上支持blob但是依然不支持download |
|
|
|
const link = document.createElement('a') // 创建a标签 |
|
|
|
link.download = fileName // a标签添加属性 |
|
|
|
link.style.display = 'none' |
|
|
|
link.href = map.downurl |
|
|
|
document.body.appendChild(link) |
|
|
|
link.click() // 执行下载 |
|
|
|
URL.revokeObjectURL(link.href) // 释放url |
|
|
|
document.body.removeChild(link) // 释放标签 |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
dosearch() { |
|
|
|
this.queryParams.current = 1 |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
|
|
|
|
//下拉框-单据类型 changeBillType |
|
|
|
getBillType() { |
|
|
|
req.pullDown({ |
|
|
|
type: 'billsType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.billType_list = res.data |
|
|
|
console.log('下拉框请求111', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// dictKey: "01"; dictType: "invoicingNature" |
|
|
|
changeBillType(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = {} |
|
|
|
this.billType_list.forEach((e) => { |
|
|
|
// eslint-disable-next-line eqeqeq |
|
|
|
if (e.dictKey == value) { |
|
|
|
bb = { |
|
|
|
type: e.dictType, |
|
|
|
name: e.dictValue, |
|
|
|
key: e.dictKey, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
} |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
this.queryParams.params.billType = bb.name |
|
|
|
// this.queryParams.params.billType = bb.sid |
|
|
|
console.log('name', this.queryParams.params.billType) |
|
|
|
}, |
|
|
|
|
|
|
|
//可模糊检索下拉框-供应商 |
|
|
|
getManu() { |
|
|
|
req.changShang({}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.manu_list = res.data |
|
|
|
console.log('下拉框请求11122', res.data) |
|
|
|
} |
|
|
|
}, |
|
|
|
doImport(row) { |
|
|
|
// 导入的代码 |
|
|
|
req |
|
|
|
.importExcel(this.queryParams.params, this.sids) |
|
|
|
.then(resp => { |
|
|
|
console.log(resp) |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeManu(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = {} |
|
|
|
this.manu_list.forEach((e) => { |
|
|
|
// eslint-disable-next-line eqeqeq |
|
|
|
if (e.sid == value) { |
|
|
|
bb = { |
|
|
|
name: e.manufacturerName, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
} |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
this.queryParams.params.manufacturerName = bb.name |
|
|
|
// this.queryParams.params.manufacturerSid = bb.sid |
|
|
|
console.log('name', this.queryParams.params.manufacturerName, 'sid', this.queryParams.params.manufacturerSid) |
|
|
|
}, |
|
|
|
|
|
|
|
//可模糊检索下拉框-客户 |
|
|
|
getCustomer() { |
|
|
|
req.kehu({}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.customer_list = res.data |
|
|
|
console.log('下拉框请求11133', res.data) |
|
|
|
} |
|
|
|
}, |
|
|
|
doExport(sids) { |
|
|
|
// 导出的代码 |
|
|
|
req |
|
|
|
.exportExcel(this.queryParams.params, this.sids) |
|
|
|
.then(resp => { |
|
|
|
var map = resp.data |
|
|
|
const fileName = map.filename // 导出文件名 |
|
|
|
// // 对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性 |
|
|
|
// // IE10以上支持blob但是依然不支持download |
|
|
|
const link = document.createElement('a') // 创建a标签 |
|
|
|
link.download = fileName // a标签添加属性 |
|
|
|
link.style.display = 'none' |
|
|
|
link.href = map.downurl |
|
|
|
document.body.appendChild(link) |
|
|
|
link.click() // 执行下载 |
|
|
|
URL.revokeObjectURL(link.href) // 释放url |
|
|
|
document.body.removeChild(link) // 释放标签 |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeCustomer(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = {} |
|
|
|
this.customer_list.forEach((e) => { |
|
|
|
// eslint-disable-next-line eqeqeq |
|
|
|
if (e.sid == value) { |
|
|
|
bb = { |
|
|
|
// type: e.dictType, |
|
|
|
name: e.customerName, |
|
|
|
// key: e.dictKey, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
} |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
this.queryParams.params.customer = bb.name |
|
|
|
// this.queryParams.params.customerSid = bb.sid |
|
|
|
console.log('name', this.queryParams.params.manufacturerName) |
|
|
|
}, |
|
|
|
//下拉框-货主类型 |
|
|
|
getCargoType() { |
|
|
|
req.pullDown({ |
|
|
|
type: 'cargoOwnerType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.cargoType_list = res.data |
|
|
|
console.log('下拉框请求111', res.data) |
|
|
|
}, |
|
|
|
dosearch() { |
|
|
|
this.queryParams.current = 1 |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
|
|
|
|
// 下拉框-单据类型 changeBillType |
|
|
|
getBillType() { |
|
|
|
req.pullDown({ |
|
|
|
type: 'billsType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.billType_list = res.data |
|
|
|
console.log('下拉框请求111', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeBillType(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = null |
|
|
|
this.billType_list.forEach((e) => { |
|
|
|
if (e.dictKey === value) { |
|
|
|
bb = { |
|
|
|
type: e.dictType, |
|
|
|
name: e.dictValue, |
|
|
|
key: e.dictKey, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeCargoType(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = {} |
|
|
|
this.cargoType_list.forEach((e) => { |
|
|
|
// eslint-disable-next-line eqeqeq |
|
|
|
if (e.dictKey == value) { |
|
|
|
bb = { |
|
|
|
type: e.dictType, |
|
|
|
name: e.dictValue, |
|
|
|
key: e.dictKey, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
this.queryParams.params.billType = bb.name |
|
|
|
console.log('name', this.queryParams.params.billType) |
|
|
|
}, |
|
|
|
|
|
|
|
// 可模糊检索下拉框-供应商 |
|
|
|
getManu() { |
|
|
|
req.changShang({}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.manu_list = res.data |
|
|
|
console.log('下拉框请求11122', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeManu(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = {} |
|
|
|
this.manu_list.forEach((e) => { |
|
|
|
if (e.sid === value) { |
|
|
|
bb = { |
|
|
|
name: e.manufacturerName, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
}) |
|
|
|
this.queryParams.params.cargoOwnerType = bb.name |
|
|
|
// this.queryParams.params.cargoOwnerType = bb.sid |
|
|
|
console.log('name', this.queryParams.params.cargoOwnerType) |
|
|
|
}, |
|
|
|
} |
|
|
|
}) |
|
|
|
this.queryParams.params.manufacturerName = bb.name |
|
|
|
// this.queryParams.params.manufacturerSid = bb.sid |
|
|
|
console.log('name', this.queryParams.params.manufacturerName, 'sid', this.queryParams.params.manufacturerSid) |
|
|
|
}, |
|
|
|
|
|
|
|
// 下拉框-单据状态 |
|
|
|
getBillState() { |
|
|
|
req.pullDown({ |
|
|
|
type: 'billState' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.billState_list = res.data |
|
|
|
console.log('下拉框请求111', res.data) |
|
|
|
// 可模糊检索下拉框-客户 |
|
|
|
getCustomer() { |
|
|
|
req.kehu({}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.customer_list = res.data |
|
|
|
console.log('下拉框请求11133', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeCustomer(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = {} |
|
|
|
this.customer_list.forEach((e) => { |
|
|
|
if (e.sid === value) { |
|
|
|
bb = { |
|
|
|
name: e.name, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeBillState(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = {} |
|
|
|
this.billState_list.forEach((e) => { |
|
|
|
// eslint-disable-next-line eqeqeq |
|
|
|
if (e.dictKey == value) { |
|
|
|
bb = { |
|
|
|
type: e.dictType, |
|
|
|
name: e.dictValue, |
|
|
|
key: e.dictKey, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
this.queryParams.params.customer = bb.name |
|
|
|
console.log('name', this.queryParams.params.manufacturerName) |
|
|
|
}, |
|
|
|
// 下拉框-货主类型 |
|
|
|
getCargoType() { |
|
|
|
req.pullDown({ |
|
|
|
type: 'cargoOwnerType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.cargoType_list = res.data |
|
|
|
console.log('下拉框请求111', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeCargoType(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = null |
|
|
|
this.cargoType_list.forEach((e) => { |
|
|
|
if (e.dictKey === value) { |
|
|
|
bb = { |
|
|
|
type: e.dictType, |
|
|
|
name: e.dictValue, |
|
|
|
key: e.dictKey, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
}) |
|
|
|
this.queryParams.params.billState = bb.name |
|
|
|
// this.formobj..scmOtherInboundDto.billState = bb.sid |
|
|
|
console.log('name', this.queryParams.params.billState) |
|
|
|
}, |
|
|
|
} |
|
|
|
}) |
|
|
|
this.queryParams.params.cargoOwnerType = bb.name |
|
|
|
console.log('name', this.queryParams.params.cargoOwnerType) |
|
|
|
}, |
|
|
|
|
|
|
|
resetQuery() { |
|
|
|
this.queryParams.params = {} |
|
|
|
this.queryParams.params.sid = '' // sid |
|
|
|
this.queryParams.params.name = '' // 登录名 |
|
|
|
this.dosearch() |
|
|
|
}, |
|
|
|
// 查询 |
|
|
|
loadList() { |
|
|
|
const _this = this |
|
|
|
this.tableLoading = true |
|
|
|
req |
|
|
|
.listPage(this.queryParams) |
|
|
|
.then(resp => { |
|
|
|
console.log('查询列表', resp) |
|
|
|
_this.tableLoading = false |
|
|
|
const data = resp.data |
|
|
|
_this.queryParams.total = data.total |
|
|
|
_this.dataList = data.records |
|
|
|
// for (var i = 0; i < data.records.length; i++) { |
|
|
|
// var timeArr = data.records[i].createTime.split(' '); |
|
|
|
// this.dataList[i].createTime = timeArr[0]; |
|
|
|
// } |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
_this.tableLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
toInfo(row) { |
|
|
|
this.viewState = 4 |
|
|
|
const billNo = row.billNo |
|
|
|
console.log('打开详情', billNo) |
|
|
|
this.$refs['divinfo'].showInfo(billNo, row) |
|
|
|
} |
|
|
|
// 下拉框-单据状态 |
|
|
|
getBillState() { |
|
|
|
req.pullDown({ |
|
|
|
type: 'billState' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.billState_list = res.data |
|
|
|
console.log('下拉框请求111', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeBillState(value) { |
|
|
|
console.log('触发下拉框按钮') |
|
|
|
let bb = {} |
|
|
|
this.billState_list.forEach((e) => { |
|
|
|
if (e.dictKey === value) { |
|
|
|
bb = { |
|
|
|
type: e.dictType, |
|
|
|
name: e.dictValue, |
|
|
|
key: e.dictKey, |
|
|
|
sid: e.sid |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
this.queryParams.params.billState = bb.name |
|
|
|
console.log('name', this.queryParams.params.billState) |
|
|
|
}, |
|
|
|
|
|
|
|
resetQuery() { |
|
|
|
this.queryParams.params = {} |
|
|
|
this.queryParams.params.sid = '' // sid |
|
|
|
this.queryParams.params.name = '' // 登录名 |
|
|
|
this.dosearch() |
|
|
|
}, |
|
|
|
// 查询 |
|
|
|
loadList() { |
|
|
|
const _this = this |
|
|
|
this.tableLoading = true |
|
|
|
req.listPage(this.queryParams).then(resp => { |
|
|
|
console.log('查询列表', resp) |
|
|
|
_this.tableLoading = false |
|
|
|
const data = resp.data |
|
|
|
_this.queryParams.total = data.total |
|
|
|
_this.dataList = data.records |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
_this.tableLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
toInfo(row) { |
|
|
|
this.viewState = 4 |
|
|
|
const billNo = row.billNo |
|
|
|
console.log('打开详情', billNo) |
|
|
|
this.$refs['divinfo'].showInfo(billNo, row) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
/deep/ .el-collapse { |
|
|
|
border-top: 0px solid #e6ebf5; |
|
|
|
border-bottom: 0px solid #e6ebf5; |
|
|
|
} |
|
|
|
/deep/ .el-collapse { |
|
|
|
border-top: 0px solid #e6ebf5; |
|
|
|
border-bottom: 0px solid #e6ebf5; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-collapse-item__content { |
|
|
|
margin: 0; |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
/deep/ .el-collapse-item__content { |
|
|
|
margin: 0; |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-collapse-item__wrap { |
|
|
|
border-bottom: 0px solid #ebeef5; |
|
|
|
} |
|
|
|
/deep/ .el-collapse-item__wrap { |
|
|
|
border-bottom: 0px solid #ebeef5; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-collapse-item__header { |
|
|
|
border-bottom: 0px solid #e6ebf5; |
|
|
|
} |
|
|
|
/deep/ .el-collapse-item__header { |
|
|
|
border-bottom: 0px solid #e6ebf5; |
|
|
|
} |
|
|
|
|
|
|
|
.searchbtn { |
|
|
|
border: #2cab69 1px solid; |
|
|
|
color: #2cab69; |
|
|
|
} |
|
|
|
.searchbtn { |
|
|
|
border: #2cab69 1px solid; |
|
|
|
color: #2cab69; |
|
|
|
} |
|
|
|
|
|
|
|
.search_label /deep/ .el-form-item__label { |
|
|
|
width: 68px; |
|
|
|
} |
|
|
|
.search_label /deep/ .el-form-item__label { |
|
|
|
width: 68px; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-form-item { |
|
|
|
margin-bottom: 5px; |
|
|
|
} |
|
|
|
/deep/ .el-form-item { |
|
|
|
margin-bottom: 5px; |
|
|
|
} |
|
|
|
|
|
|
|
/*/deep/ .el-form-item:nth-of-type(4) {*/ |
|
|
|
/* margin-right: 260px;*/ |
|
|
|
/*}*/ |
|
|
|
/*/deep/ .el-form-item:nth-of-type(4) {*/ |
|
|
|
/* margin-right: 260px;*/ |
|
|
|
/*}*/ |
|
|
|
</style> |
|
|
|