|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<a-card :bordered="false">
|
|
|
|
<!-- 查询区域 -->
|
|
|
|
<div class="table-page-search-wrapper">
|
|
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
|
<a-row :gutter="24">
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
<a-form-item label="供应商">
|
|
|
|
<a-input placeholder="请输入供应商" v-model="queryParam.supplier"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
<a-form-item label="供应商描述">
|
|
|
|
<a-input placeholder="请输入供应商描述" v-model="queryParam.supplierDescription"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
<a-form-item label="物料组">
|
|
|
|
<a-input placeholder="请输入物料组" v-model="queryParam.materialGroup"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
|
|
|
|
<!-- <a-form-item label="物料">-->
|
|
|
|
<!-- <a-input placeholder="请输入物料" v-model="queryParam.material" :read-only="true"></a-input>-->
|
|
|
|
<!-- </a-form-item>-->
|
|
|
|
<!-- </a-col>-->
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
<a-form-item label="物料描述">
|
|
|
|
<a-input placeholder="请输入物料描述" v-model="queryParam.materialDescription"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
<a-form-item label="所属工作队">
|
|
|
|
<a-input placeholder="请输入所属工作队" v-model="queryParam.theirTeam"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
<a-form-item label="生产日期">
|
|
|
|
<j-date placeholder="请选择生产日期" v-model="queryParam.productionDate"></j-date>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
<a-form-item label="保质期">
|
|
|
|
<a-input placeholder="请选择保质期" v-model="queryParam.expirationDate"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
<a-form-item label="入库时间">
|
|
|
|
<j-date placeholder="请选择入库时间" v-model="queryParam.inboundTime"></j-date>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
<a-form-item label="物资状态">
|
|
|
|
<a-input placeholder="请输入物资状态" v-model="queryParam.materialsState"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</a-form>
|
|
|
|
</div>
|
|
|
|
<div class="table-operator">
|
|
|
|
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
|
|
|
<a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- 查询区域-END -->
|
|
|
|
|
|
|
|
<!-- table区域-begin -->
|
|
|
|
<div>
|
|
|
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
|
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
|
|
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<a-table
|
|
|
|
ref="table"
|
|
|
|
size="middle"
|
|
|
|
:scroll="{x:true}"
|
|
|
|
bordered
|
|
|
|
rowKey="id"
|
|
|
|
:columns="columns"
|
|
|
|
:dataSource="dataSource"
|
|
|
|
:pagination="ipagination"
|
|
|
|
:loading="loading"
|
|
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
|
class="j-table-force-nowrap"
|
|
|
|
@change="handleTableChange">
|
|
|
|
|
|
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
|
|
<div v-html="text"></div>
|
|
|
|
</template>
|
|
|
|
<template slot="imgSlot" slot-scope="text">
|
|
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
|
|
|
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
|
|
|
</template>
|
|
|
|
<template slot="fileSlot" slot-scope="text">
|
|
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
|
|
|
<a-button
|
|
|
|
v-else
|
|
|
|
:ghost="true"
|
|
|
|
type="primary"
|
|
|
|
icon="download"
|
|
|
|
size="small"
|
|
|
|
@click="downloadFile(text)">
|
|
|
|
下载
|
|
|
|
</a-button>
|
|
|
|
</template>
|
|
|
|
</a-table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<process-waste-materials-modal ref="modalForm" @ok="modalFormOk"></process-waste-materials-modal>
|
|
|
|
</a-card>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import '@/assets/less/TableExpand.less'
|
|
|
|
import { mixinDevice } from '@/utils/mixin'
|
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
|
import ProcessWasteMaterialsModal from '@views/wastematerials/modules/ProcessWasteMaterialsModal'
|
|
|
|
import { httpAction, getAction } from '@/api/manage'
|
|
|
|
import JDate from '@/components/jeecg/JDate.vue'
|
|
|
|
import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'
|
|
|
|
import ProcessWasteMaterialsList from '@views/wastematerials/ProcessWasteMaterialsList'
|
|
|
|
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
|
|
|
|
import { ajaxGetDictItems, getDictItemsFromCache } from '@api/api'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'ProcessWasteMaterialsLists',
|
|
|
|
mixins:[JeecgListMixin, mixinDevice],
|
|
|
|
components: {
|
|
|
|
ProcessWasteMaterialsList,
|
|
|
|
JDate,
|
|
|
|
ProcessWasteMaterialsModal,
|
|
|
|
JSuperQuery,
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
material: this.$route.params.material,
|
|
|
|
queryParam:{
|
|
|
|
supplier: null,
|
|
|
|
supplierDescription: null,
|
|
|
|
materialGroup : null,
|
|
|
|
material : this.$route.params.material,
|
|
|
|
materialDescription: null,
|
|
|
|
theirTeam: null,
|
|
|
|
productionDate: null,
|
|
|
|
expirationDate: null,
|
|
|
|
inboundTime: null,
|
|
|
|
materialsState: null,
|
|
|
|
del_flag: 0
|
|
|
|
},
|
|
|
|
|
|
|
|
description: '账外物资库管理页面',
|
|
|
|
dataSource:[],
|
|
|
|
// 表头
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
title: '#',
|
|
|
|
dataIndex: '',
|
|
|
|
key:'rowIndex',
|
|
|
|
width:60,
|
|
|
|
align:"center",
|
|
|
|
customRender:function (t,r,index) {
|
|
|
|
return parseInt(index)+1;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'供应商',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'supplier'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'供应商描述',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'supplierDescription'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'物料组',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'materialGroup'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'物料',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'material'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'物料描述',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'materialDescription'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'库存位置',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'materialStorageId'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'库存仓位',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'freightSpace'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'计量单位',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'materialsUnit'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'数量',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'number'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'单价',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'price'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'金额',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'money'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'生产日期',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'productionDate',
|
|
|
|
customRender:function (text) {
|
|
|
|
return !text?"":(text.length>10?text.substr(0,10):text)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'保质期',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'expirationDate'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'入库时间',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'inboundTime'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:'入库人',
|
|
|
|
align:"center",
|
|
|
|
dataIndex: 'warehousePeople'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '核算属性',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'accountingAttributes_dictText',
|
|
|
|
}
|
|
|
|
],
|
|
|
|
url: {
|
|
|
|
list: "/wastematerials/processWasteMaterials/lists",
|
|
|
|
delete: "/wastematerials/processWasteMaterials/delete",
|
|
|
|
deleteBatch: "/wastematerials/processWasteMaterials/deleteBatch",
|
|
|
|
exportXlsUrl: "/wastematerials/processWasteMaterials/exportXls",
|
|
|
|
importExcelUrl: "wastematerials/processWasteMaterials/importExcel",
|
|
|
|
|
|
|
|
},
|
|
|
|
dictOptions:{},
|
|
|
|
superFieldList:[],
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
// 判断路由上是否存在参数,如果没有则跳转回帐外物资管理页面
|
|
|
|
this.judgeRouterParam();
|
|
|
|
this.getSuperFieldList();
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
importExcelUrl: function(){
|
|
|
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
judgeRouterParam(){
|
|
|
|
if (this.$route.params.material == null){
|
|
|
|
this.$router.go(-1);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
initDictConfig(){
|
|
|
|
},
|
|
|
|
searchQuery(){
|
|
|
|
getAction(this.url.list,this.queryParam).then((res)=>{
|
|
|
|
if(res.success){
|
|
|
|
console.log("resultsearch :")
|
|
|
|
console.log(res.result);
|
|
|
|
console.log(this.queryParam)
|
|
|
|
this.dataSource=res.result.records;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
searchReset(){
|
|
|
|
this.queryParam = {
|
|
|
|
supplier: null,
|
|
|
|
supplierDescription: null,
|
|
|
|
materialGroup : null,
|
|
|
|
material : this.$route.params.material,
|
|
|
|
materialDescription: null,
|
|
|
|
theirTeam: null,
|
|
|
|
productionDate: null,
|
|
|
|
expirationDate: null,
|
|
|
|
inboundTime: null,
|
|
|
|
materialsState: null,
|
|
|
|
del_flag: 0
|
|
|
|
},
|
|
|
|
getAction(this.url.list,this.queryParam).then((res)=>{
|
|
|
|
if(res.success){
|
|
|
|
console.log("resultsearch :")
|
|
|
|
console.log(res.result);
|
|
|
|
console.log(this.queryParam)
|
|
|
|
this.dataSource=res.result.records;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
loadData(){
|
|
|
|
getAction(this.url.list,this.queryParam).then((res)=>{
|
|
|
|
if(res.success){
|
|
|
|
console.log("result :")
|
|
|
|
console.log(res.result)
|
|
|
|
console.log(this.queryParam)
|
|
|
|
this.dataSource=res.result.records;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
getSuperFieldList(){
|
|
|
|
let fieldList=[];
|
|
|
|
fieldList.push({type:'string',value:'supplier',text:'供应商',dictCode:''})
|
|
|
|
fieldList.push({type:'string',value:'supplierDescription',text:'供应商描述',dictCode:''})
|
|
|
|
fieldList.push({type:'string',value:'materialGroup',text:'物料组',dictCode:''})
|
|
|
|
fieldList.push({type:'string',value:'material',text:'物料',dictCode:''})
|
|
|
|
fieldList.push({type:'string',value:'materialDescription',text:'物料描述',dictCode:''})
|
|
|
|
fieldList.push({type:'string',value:'materialStorageId',text:'库存位置',dictCode:''})
|
|
|
|
fieldList.push({type:'string',value:'freightSpace',text:'库存仓位',dictCode:''})
|
|
|
|
fieldList.push({type:'string',value:'materialsUnit',text:'计量单位',dictCode:''})
|
|
|
|
fieldList.push({type:'int',value:'number',text:'数量',dictCode:''})
|
|
|
|
fieldList.push({type:'BigDecimal',value:'price',text:'单价',dictCode:''})
|
|
|
|
fieldList.push({type:'BigDecimal',value:'money',text:'金额',dictCode:''})
|
|
|
|
fieldList.push({type:'date',value:'productionDate',text:'生产日期'})
|
|
|
|
fieldList.push({type:'String',value:'expirationDate',text:'保质期'})
|
|
|
|
fieldList.push({type:'date',value:'inboundTime',text:'入库时间',dictCode:''})
|
|
|
|
fieldList.push({type:'string',value:'warehousePeople',text:'入库人',dictCode:''})
|
|
|
|
fieldList.push({type:'string',value:'accountingAttributes',text:'核算属性',dictCode:''})
|
|
|
|
this.superFieldList = fieldList
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
@import '~@assets/less/common.less';
|
|
|
|
</style>
|