product
杨世强 2 years ago
commit 94ffb3b371

@ -89,9 +89,9 @@ public class TradeuploadController {
Map<String,Object> materialCodeMap = new HashMap<>();
entity.setMaterialCode(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_code",entity.getMaterialCode(),materialCodeMap));
Map<String,Object> salesNameMap = new HashMap<>();
entity.setSalesName(generaterSwapUtil.swapRelationFormValue("selectField121",entity.getSalesName(),"294090217084722181",salesNameMap));
entity.setSalesName(generaterSwapUtil.getPopupSelectValue("381038993740949317","id","contract_name",entity.getSalesName(),salesNameMap));
Map<String,Object> licenseNoMap = new HashMap<>();
entity.setLicenseNo(generaterSwapUtil.swapRelationFormValue("selectField122",entity.getLicenseNo(),"294090217084722181",licenseNoMap));
entity.setLicenseNo(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",entity.getLicenseNo(),licenseNoMap));
entity.setPoundPictures(generaterSwapUtil.getFileNameInJson(entity.getPoundPictures()));
entity.setVehiclePictures(generaterSwapUtil.getFileNameInJson(entity.getVehiclePictures()));
}

@ -1,58 +1,53 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="24" >
<el-form-item label="区域名称"
prop="mName" >
<el-input v-model="dataForm.mName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="区域名称" prop="mName">
<el-input v-model="dataForm.mName" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="创建时间"
prop="creatortime" >
<el-date-picker v-model="dataForm.creatortime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="24">
<el-form-item label="创建时间" prop="creatortime">
<el-date-picker v-model="dataForm.creatortime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="创建人名称"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="创建人名称" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="修改时间"
prop="lastmodifytime" >
<el-date-picker v-model="dataForm.lastmodifytime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="24">
<el-form-item label="修改时间" prop="lastmodifytime">
<el-date-picker v-model="dataForm.lastmodifytime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="修改人名称"
prop="lastmodifyusername" >
<el-input v-model="dataForm.lastmodifyusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="修改人名称" prop="lastmodifyusername">
<el-input v-model="dataForm.lastmodifyusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -62,8 +57,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -73,32 +72,28 @@
loading: false,
isDetail: false,
dataForm: {
mName : '',
creatortime : '',
creatorusername : '',
lastmodifytime : '',
lastmodifyusername : '',
mName: '',
creatortime: '',
creatorusername: '',
lastmodifytime: '',
lastmodifyusername: '',
},
rules:
{
mName: [
{
rules: {
mName: [{
required: true,
message: '请输入',
trigger: 'blur'
},
],
}, ],
},
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -115,16 +110,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/areasetting/Areasetting/'+this.dataForm.id,
url: '/api/areasetting/Areasetting/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -139,7 +134,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/areasetting/Areasetting',
@ -156,9 +151,9 @@
}
})
})
}else{
} else {
request({
url: '/api/areasetting/Areasetting/'+this.dataForm.id,
url: '/api/areasetting/Areasetting/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -174,15 +169,14 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
},
},
}
</script>

@ -22,65 +22,68 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="mName" label="区域名称" width="0" align="left"
/>
<el-table-column prop="creatortime" label="创建时间" width="0" align="left"
/>
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left"
/>
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left"
/>
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="100" >
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="mName" label="区域名称" width="0" align="left" />
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" />
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left" />
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left" />
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
mName:undefined,
mName: undefined,
},
treeProps: {
children: 'children',
@ -89,7 +92,8 @@
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -98,12 +102,26 @@
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'mName', label: '区域名称'},
{prop: 'creatortime', label: '创建时间'},
{prop: 'creatorusername', label: '创建人名称'},
{prop: 'lastmodifytime', label: '修改时间'},
{prop: 'lastmodifyusername', label: '修改人名称'},
columnList: [{
prop: 'mName',
label: '区域名称'
},
{
prop: 'creatortime',
label: '创建时间'
},
{
prop: 'creatorusername',
label: '创建人名称'
},
{
prop: 'lastmodifytime',
label: '修改时间'
},
{
prop: 'lastmodifyusername',
label: '修改人名称'
},
],
}
},
@ -116,13 +134,17 @@
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -132,15 +154,15 @@
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/areasetting/Areasetting/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -166,8 +188,7 @@
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -198,8 +219,7 @@
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -214,7 +234,12 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/areasetting/Areasetting/Actions/Export`,
method: 'GET',

@ -1,194 +1,170 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<div class="JNPF-common-page-header">
<el-page-header @back="goBack"
:content="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"/>
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" />
<div class="options">
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="8" >
<el-form-item label="合同类型 "
prop="contractType" >
<el-select v-model="dataForm.contractType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in contractTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="8">
<el-form-item label="合同类型 " prop="contractType">
<el-select v-model="dataForm.contractType" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in contractTypeOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="合同编码"
prop="contractCode" >
<el-input v-model="dataForm.contractCode"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="合同编码" prop="contractCode">
<el-input v-model="dataForm.contractCode" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="合同名称"
prop="contractName" >
<el-input v-model="dataForm.contractName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="合同名称" prop="contractName">
<el-input v-model="dataForm.contractName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="合同状态"
prop="status" >
<el-input v-model="dataForm.status"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="合同状态" prop="status">
<el-input v-model="dataForm.status" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="开标日期"
prop="bidOpeningDate" >
<el-date-picker v-model="dataForm.bidOpeningDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
<el-col :span="8">
<el-form-item label="开标日期" prop="bidOpeningDate">
<el-date-picker v-model="dataForm.bidOpeningDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="开始日期"
prop="startDate" >
<el-date-picker v-model="dataForm.startDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
<el-col :span="8">
<el-form-item label="开始日期" prop="startDate">
<el-date-picker v-model="dataForm.startDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="审核日期"
prop="auditDate" >
<el-date-picker v-model="dataForm.auditDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
<el-col :span="8">
<el-form-item label="审核日期" prop="auditDate">
<el-date-picker v-model="dataForm.auditDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="供货完成日期"
prop="completionDate" >
<el-date-picker v-model="dataForm.completionDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
<el-col :span="8">
<el-form-item label="供货完成日期" prop="completionDate">
<el-date-picker v-model="dataForm.completionDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="关闭日期"
prop="closingDate" >
<el-date-picker v-model="dataForm.closingDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
<el-col :span="8">
<el-form-item label="关闭日期" prop="closingDate">
<el-date-picker v-model="dataForm.closingDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="回款周期(日)"
prop="collectionCycle" >
<el-input v-model="dataForm.collectionCycle"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="回款周期(日)" prop="collectionCycle">
<!-- <el-input v-model="dataForm.collectionCycle" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-input> -->
<el-input-number v-model="dataForm.collectionCycle" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="签订日期"
prop="signingDate" >
<el-date-picker v-model="dataForm.signingDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
<el-col :span="8">
<el-form-item label="签订日期" prop="signingDate">
<el-date-picker v-model="dataForm.signingDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="截止日期"
prop="endDate" >
<el-date-picker v-model="dataForm.endDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
<el-col :span="8">
<el-form-item label="截止日期" prop="endDate">
<el-date-picker v-model="dataForm.endDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="供应商/客户编"
prop="code" >
<el-input v-model="dataForm.code"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="供应商/客户编" prop="code">
<el-input v-model="dataForm.code" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="供应商/客户名"
prop="name" >
<el-input v-model="dataForm.name"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="供应商/客户名" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="对方合同号"
prop="contractNo" >
<el-input v-model="dataForm.contractNo"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="对方合同号" prop="contractNo">
<el-input v-model="dataForm.contractNo" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="币种 "
prop="currency" >
<el-input v-model="dataForm.currency"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="币种 " prop="currency">
<el-select v-model="dataForm.currency" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in currencyOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-input>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="数量"
prop="num" >
<el-input v-model="dataForm.num"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<el-col :span="8">
<el-form-item label="数量" prop="num">
<el-input-number v-model="dataForm.num" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="金额"
prop="amount" >
<el-input v-model="dataForm.amount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<el-col :span="8">
<el-form-item label="金额" prop="amount">
<el-input-number v-model="dataForm.amount" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="库存组织"
prop="organization" >
<el-input v-model="dataForm.organization"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="库存组织" prop="organization">
<el-input v-model="dataForm.organization" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="16" >
<el-form-item label="备注"
prop="remark" >
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="16">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
@ -239,11 +215,9 @@
</el-form-item>
</el-col>
-->
<el-col :span="24" >
<el-form-item label="集团审批"
prop="approval" >
<el-switch v-model="dataForm.approval"
:active-value="1" :inactive-value="0" >
<el-col :span="24">
<el-form-item label="集团审批" prop="approval">
<el-switch v-model="dataForm.approval" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
@ -251,93 +225,82 @@
<el-col :span="24">
<el-tabs v-model="activemdfrsi" tab-position="top" class="mb-20">
<el-tab-pane label="物料明细">
<el-col :span="24" >
<el-col :span="24">
<el-form-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.contract_item0List" size='mini' >
<el-table :data="dataForm.contract_item0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="materialCode" label="物料编码">
<el-table-column prop="materialCode" label="物料编码" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.materialCode"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.materialCode" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="materialName" label="物料名称">
<el-table-column prop="materialName" label="物料名称" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.materialName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.materialName" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="specification" label="规格型号">
<el-table-column prop="specification" label="规格型号" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.specification"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.specification" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="单位 ">
<el-table-column prop="unit" label="单位 " align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.unit"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.unit" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="num" label="数量">
<el-table-column prop="num" label="数量" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.num"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<el-input-number v-model="scope.row.num" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
</template>
</el-table-column>
<el-table-column prop="price" label="单价">
<el-table-column prop="price" label="单价" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.price"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<el-input-number v-model="scope.row.price" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
<el-table-column prop="amount" label="金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<el-input-number v-model="scope.row.amount" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率 ">
<el-table-column prop="rate" label="税率 " align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.rate"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<el-input-number v-model="scope.row.rate" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
</template>
</el-table-column>
<el-table-column prop="notPrice" label="不含税单价">
<el-table-column prop="notPrice" label="不含税单价" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.notPrice"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<el-input-number v-model="scope.row.notPrice" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
</template>
</el-table-column>
<el-table-column prop="notAmount" label="不含税金额">
<el-table-column prop="notAmount" label="不含税金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.notAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<el-input-number v-model="scope.row.notAmount" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
<el-table-column prop="remark" label="备注" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.remark" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="50" >
<el-table-column label="操作" width="50" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delcontract_item0List(scope.$index)"></el-button>
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delcontract_item0List(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -346,25 +309,26 @@
</div>
</el-form-item>
</el-col>
</el-tab-pane >
</el-tab-pane>
<el-tab-pane label="附件详情">
<el-col :span="24" >
<el-col :span="24">
<el-form-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.contract_item1List" size='mini' >
<el-table :data="dataForm.contract_item1List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="enclosure" label="附件内容">
<template slot-scope="scope">
<JNPF-UploadFz v-model="scope.row.enclosure"
:fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" >
<JNPF-UploadFz v-model="scope.row.enclosure" :fileSize="5"
sizeUnit="MB" :limit="9" buttonText="点击上传">
</JNPF-UploadFz>
</template>
</el-table-column>
<el-table-column label="操作" width="50" >
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delcontract_item1List(scope.$index)"></el-button>
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delcontract_item1List(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -373,19 +337,23 @@
</div>
</el-form-item>
</el-col>
</el-tab-pane >
</el-tab-pane>
</el-tabs>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
</div>
</transition>
</transition>
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -395,89 +363,109 @@
loading: false,
isDetail: false,
dataForm: {
contractType : "",
contractCode : '',
contractName : '',
status : '',
bidOpeningDate : '',
startDate : '',
auditDate : '',
completionDate : '',
closingDate : '',
collectionCycle : '',
signingDate : '',
endDate : '',
code : '',
name : '',
contractNo : '',
currency : '',
num : '',
amount : '',
organization : '',
remark : '',
classification : '',
declarationDate : '',
deptCode : '',
creatorusername : '',
deptName : '',
approval : 0,
contract_item0List:[],
contract_item1List:[],
contractType: "",
contractCode: '',
contractName: '',
status: '',
bidOpeningDate: '',
startDate: '',
auditDate: '',
completionDate: '',
closingDate: '',
collectionCycle: '',
signingDate: '',
endDate: '',
code: '',
name: '',
contractNo: '',
currency: '',
num: '',
amount: '',
organization: '',
remark: '',
classification: '',
declarationDate: '',
deptCode: '',
creatorusername: '',
deptName: '',
approval: 0,
contract_item0List: [],
contract_item1List: [],
},
activemdfrsi:'0',
rules:
{
contractType: [
{
activemdfrsi: '0',
rules: {
contractType: [{
required: true,
message: '请选择',
trigger: 'change'
},
],
contractCode: [
{
}, ],
contractCode: [{
required: true,
message: '请输入',
trigger: 'blur'
},
],
contractName: [
{
}, ],
contractName: [{
required: true,
message: '请输入',
trigger: 'blur'
},
],
bidOpeningDate: [
{
}, ],
bidOpeningDate: [{
required: true,
message: '请选择',
trigger: 'change'
}, ],
},
],
currencyOptions: [{
"fullName": "CNY",
"id": "CNY"
}, {
"fullName": "USD",
"id": "USD"
}, {
"fullName": "EUR",
"id": "EUR"
}],
contractTypeOptions: [{
"fullName": "采购合同",
"id": "1"
}, {
"fullName": "销售合同",
"id": "2"
},
{
"fullName": "租赁合同",
"id": "3"
}, {
"fullName": "仓储合同",
"id": "4"
}, {
"fullName": "运输合同",
"id": "5"
},
contractTypeOptions:[{"fullName":"采购合同","id":"1"},{"fullName":"销售合同","id":"2"},
{"fullName":"租赁合同","id":"3"},{"fullName":"仓储合同","id":"4"},{"fullName":"运输合同","id":"5"},
{"fullName":"施工合同","id":"6"}],
{
"fullName": "施工合同",
"id": "6"
}
],
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
contract_item0Exist() {
let isOk = true;
for(let i=0;i<this.dataForm.contract_item0List.length;i++){
for (let i = 0; i < this.dataForm.contract_item0List.length; i++) {
const e = this.dataForm.contract_item0List[i];
}
return isOk;
},
contract_item1Exist() {
let isOk = true;
for(let i=0;i<this.dataForm.contract_item1List.length;i++){
for (let i = 0; i < this.dataForm.contract_item1List.length; i++) {
const e = this.dataForm.contract_item1List[i];
}
return isOk;
@ -485,7 +473,7 @@
goBack() {
this.$emit('refresh')
},
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -502,16 +490,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/example/ContractFile/'+this.dataForm.id,
url: '/api/example/ContractFile/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -528,7 +516,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/example/ContractFile',
@ -545,9 +533,9 @@
}
})
})
}else{
} else {
request({
url: '/api/example/ContractFile/'+this.dataForm.id,
url: '/api/example/ContractFile/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -563,53 +551,53 @@
})
}
},
addcontract_item0List(){
addcontract_item0List() {
let item = {
materialCode:undefined,
materialName:undefined,
specification:undefined,
unit:undefined,
num:undefined,
price:undefined,
amount:undefined,
rate:undefined,
notPrice:undefined,
notAmount:undefined,
remark:undefined,
materialCode: undefined,
materialName: undefined,
specification: undefined,
unit: undefined,
num: undefined,
price: undefined,
amount: undefined,
rate: undefined,
notPrice: undefined,
notAmount: undefined,
remark: undefined,
}
this.dataForm.contract_item0List.push(item)
},
delcontract_item0List(index) {
this.dataForm.contract_item0List.splice(index, 1);
},
addcontract_item1List(){
addcontract_item1List() {
let item = {
enclosure:undefined,
enclosure: undefined,
}
this.dataForm.contract_item1List.push(item)
},
delcontract_item1List(index) {
this.dataForm.contract_item1List.splice(index, 1);
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.approval = parseInt(_data.approval)
for(let i=0;i<_data.contract_item0List.length;i++){
for (let i = 0; i < _data.contract_item0List.length; i++) {
var _list = _data.contract_item0List[i];
}
for(let i=0;i<_data.contract_item1List.length;i++){
for (let i = 0; i < _data.contract_item1List.length; i++) {
var _list = _data.contract_item1List[i];
_list.enclosure = JSON.stringify(_list.enclosure)
}
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.approval = parseInt( _dataAll.approval)
for(let i=0;i<_dataAll.contract_item0List.length;i++){
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.approval = parseInt(_dataAll.approval)
for (let i = 0; i < _dataAll.contract_item0List.length; i++) {
var _list = _dataAll.contract_item0List[i];
}
for(let i=0;i<_dataAll.contract_item1List.length;i++){
for (let i = 0; i < _dataAll.contract_item1List.length; i++) {
var _list = _dataAll.contract_item1List[i];
_list.enclosure = JSON.parse(_list.enclosure)
}
@ -617,5 +605,4 @@
},
},
}
</script>

@ -27,91 +27,84 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="contractCode" label="合同编码" width="0" align="left"
/>
<el-table-column prop="contractName" label="合同名称" width="0" align="left"
/>
<el-table-column prop="contractNo" label="对方合同号" width="0" align="left"
/>
<el-table-column label="合同类型 " width="0" prop="contractType" algin="left"
>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="contractCode" label="合同编码" width="0" align="left" />
<el-table-column prop="contractName" label="合同名称" width="0" align="left" />
<el-table-column prop="contractNo" label="对方合同号" width="0" align="left" />
<el-table-column label="合同类型 " width="0" prop="contractType" algin="left">
<template slot-scope="scope">
{{ scope.row.contractType | dynamicText(contractTypeOptions) }}
</template>
</el-table-column>
<el-table-column prop="classification" label="合同分类 " width="0" align="left"
/>
<el-table-column prop="declarationDate" label="申报日期" width="0" align="left"
/>
<el-table-column prop="name" label="供应商/客户名" width="0" align="left"
/>
<el-table-column prop="num" label="数量" width="0" align="left"
/>
<el-table-column prop="amount" label="金额" width="0" align="left"
/>
<el-table-column prop="deptName" label="部门名称" width="0" align="left"
/>
<el-table-column prop="remark" label="备注" width="0" align="left"
/>
<el-table-column prop="creatorusername" label="录入人" width="0" align="left"
/>
<el-table-column prop="status" label="合同状态" width="0" align="left"
/>
<el-table-column prop="approval" label="集团审批" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="150" >
<el-table-column prop="classification" label="合同分类 " width="0" align="left" />
<el-table-column prop="declarationDate" label="申报日期" width="0" align="left" />
<el-table-column prop="name" label="供应商/客户名" width="0" align="left" />
<el-table-column prop="num" label="数量" width="0" align="left" />
<el-table-column prop="amount" label="金额" width="0" align="left" />
<el-table-column prop="deptName" label="部门名称" width="0" align="left" />
<el-table-column prop="remark" label="备注" width="0" align="left" />
<el-table-column prop="creatorusername" label="录入人" width="0" align="left" />
<el-table-column prop="status" label="合同状态" width="0" align="left" />
<el-table-column prop="approval" label="集团审批" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
contractCode:undefined,
contractName:undefined,
contractCode: undefined,
contractName: undefined,
},
treeProps: {
children: 'children',
@ -120,7 +113,8 @@ width="150" >
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -129,26 +123,89 @@ width="150" >
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'contractCode', label: '合同编码'},
{prop: 'contractName', label: '合同名称'},
{prop: 'contractNo', label: '对方合同号'},
{prop: 'contractType', label: '合同类型 '},
{prop: 'classification', label: '合同分类 '},
{prop: 'declarationDate', label: '申报日期'},
{prop: 'name', label: '供应商/客户名'},
{prop: 'num', label: '数量'},
{prop: 'amount', label: '金额'},
{prop: 'deptName', label: '部门名称'},
{prop: 'remark', label: '备注'},
{prop: 'creatorusername', label: '录入人'},
{prop: 'status', label: '合同状态'},
{prop: 'approval', label: '集团审批'},
columnList: [{
prop: 'contractCode',
label: '合同编码'
},
{
prop: 'contractName',
label: '合同名称'
},
{
prop: 'contractNo',
label: '对方合同号'
},
{
prop: 'contractType',
label: '合同类型 '
},
{
prop: 'classification',
label: '合同分类 '
},
{
prop: 'declarationDate',
label: '申报日期'
},
{
prop: 'name',
label: '供应商/客户名'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'amount',
label: '金额'
},
{
prop: 'deptName',
label: '部门名称'
},
{
prop: 'remark',
label: '备注'
},
{
prop: 'creatorusername',
label: '录入人'
},
{
prop: 'status',
label: '合同状态'
},
{
prop: 'approval',
label: '集团审批'
},
],
contractTypeOptions: [{
"fullName": "采购合同",
"id": "1"
}, {
"fullName": "销售合同",
"id": "2"
},
{
"fullName": "租赁合同",
"id": "3"
}, {
"fullName": "仓储合同",
"id": "4"
}, {
"fullName": "运输合同",
"id": "5"
},
{
"fullName": "施工合同",
"id": "6"
}
],
contractTypeOptions:[{"fullName":"采购合同","id":"1"},{"fullName":"销售合同","id":"2"},
{"fullName":"租赁合同","id":"3"},{"fullName":"仓储合同","id":"4"},{"fullName":"运输合同","id":"5"},
{"fullName":"施工合同","id":"6"}],
contractTypeProps:{"label":"fullName","value":"id"},
contractTypeProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
@ -160,13 +217,17 @@ width="150" >
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -176,15 +237,15 @@ width="150" >
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/example/ContractFile/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -210,8 +271,7 @@ width="150" >
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -242,8 +302,7 @@ width="150" >
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -258,7 +317,12 @@ width="150" >
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/Actions/Export`,
method: 'GET',

@ -1,95 +1,84 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="600px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="12" >
<el-form-item label="客户编码"
prop="supplierCd" >
<el-input v-model="dataForm.supplierCd"
placeholder="请输入客户编码" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="客户编码" prop="supplierCd">
<el-input v-model="dataForm.supplierCd" placeholder="请输入客户编码" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="客户名称"
prop="supplierNm" >
<el-input v-model="dataForm.supplierNm"
placeholder="请输入客户名称" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="客户名称" prop="supplierNm">
<el-input v-model="dataForm.supplierNm" placeholder="请输入客户名称" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="所属公司ID"
prop="orgId" >
<el-input v-model="dataForm.orgId"
placeholder="请输入所属公司ID" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="所属公司ID" prop="orgId">
<el-input v-model="dataForm.orgId" placeholder="请输入所属公司ID" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="公司代码"
prop="orgName" >
<el-input v-model="dataForm.orgName"
placeholder="请输入公司代码" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="公司代码" prop="orgName">
<el-input v-model="dataForm.orgName" placeholder="请输入公司代码" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="客户等级"
prop="customerLevel" >
<el-select v-model="dataForm.customerLevel"
placeholder="请选择客户等级" :style='{"width":"100%"}'>
<el-option v-for="(item, index) in customerLevelOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="客户等级" prop="customerLevel">
<el-select v-model="dataForm.customerLevel" placeholder="请选择客户等级" :style='{"width":"100%"}'>
<el-option v-for="(item, index) in customerLevelOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="联系人"
prop="contactName" >
<el-input v-model="dataForm.contactName"
placeholder="请输入联系人" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="联系人" prop="contactName">
<el-input v-model="dataForm.contactName" placeholder="请输入联系人" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="地址"
prop="address" >
<el-input v-model="dataForm.address"
placeholder="请输入地址" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="地址" prop="address">
<el-input v-model="dataForm.address" placeholder="请输入地址" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="电话"
prop="contactPhone" >
<el-input v-model="dataForm.contactPhone"
placeholder="请输入电话" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="电话" prop="contactPhone">
<el-input v-model="dataForm.contactPhone" placeholder="请输入电话" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否启用"
prop="status" >
<el-switch v-model="dataForm.status"
:active-value="1" :inactive-value="0" >
<el-col :span="12">
<el-form-item label="是否启用" prop="status">
<el-switch v-model="dataForm.status" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -99,8 +88,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -110,46 +103,48 @@
loading: false,
isDetail: false,
dataForm: {
supplierCd : '',
supplierNm : '',
orgId : '',
orgName : '',
customerLevel : "1",
contactName : '',
address : '',
contactPhone : '',
status : 1,
supplierCd: '',
supplierNm: '',
orgId: '',
orgName: '',
customerLevel: "1",
contactName: '',
address: '',
contactPhone: '',
status: 1,
},
rules:
{
supplierCd: [
{
rules: {
supplierCd: [{
required: true,
message: '请输入客户编码',
trigger: 'blur'
},
],
supplierNm: [
{
}, ],
supplierNm: [{
required: true,
message: '请输入客户名称',
trigger: 'blur'
}, ],
contactPhone: [],
},
],
contactPhone: [
],
},
customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}],
customerLevelOptions: [{
"fullName": "一级",
"id": "1"
}, {
"fullName": "二级",
"id": "2"
}, {
"fullName": "三级",
"id": "3"
}],
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -166,16 +161,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/customer/Customer/'+this.dataForm.id,
url: '/api/customer/Customer/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -190,7 +185,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/customer/Customer',
@ -207,9 +202,9 @@
}
})
})
}else{
} else {
request({
url: '/api/customer/Customer/'+this.dataForm.id,
url: '/api/customer/Customer/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -225,17 +220,16 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.status = parseInt(_data.status)
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.status = parseInt( _dataAll.status)
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.status = parseInt(_dataAll.status)
this.dataForm = _dataAll
},
},
}
</script>

@ -27,81 +27,79 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="supplierCd" label="客户编码" width="0" align="left"
sortable="custom" />
<el-table-column prop="supplierNm" label="客户名称" width="0" align="left"
sortable="custom" />
<el-table-column prop="orgId" label="所属公司ID" width="0" align="left"
sortable="custom" />
<el-table-column prop="orgName" label="公司代码" width="0" align="left"
sortable="custom" />
<el-table-column label="客户等级" width="0" prop="customerLevel" algin="left"
sortable="custom" >
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="supplierCd" label="客户编码" width="0" align="left" sortable="custom" />
<el-table-column prop="supplierNm" label="客户名称" width="0" align="left" sortable="custom" />
<el-table-column prop="orgId" label="所属公司ID" width="0" align="left" sortable="custom" />
<el-table-column prop="orgName" label="公司代码" width="0" align="left" sortable="custom" />
<el-table-column label="客户等级" width="0" prop="customerLevel" algin="left" sortable="custom">
<template slot-scope="scope">
{{ scope.row.customerLevel | dynamicText(customerLevelOptions) }}
</template>
</el-table-column>
<el-table-column prop="contactName" label="联系人" width="0" align="left"
sortable="custom" />
<el-table-column prop="address" label="地址" width="0" align="left"
sortable="custom" />
<el-table-column prop="contactPhone" label="电话" width="0" align="left"
sortable="custom" />
<el-table-column prop="status" label="是否启用" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="150" >
<el-table-column prop="contactName" label="联系人" width="0" align="left" sortable="custom" />
<el-table-column prop="address" label="地址" width="0" align="left" sortable="custom" />
<el-table-column prop="contactPhone" label="电话" width="0" align="left" sortable="custom" />
<el-table-column prop="status" label="是否启用" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
supplierCd:undefined,
supplierNm:undefined,
supplierCd: undefined,
supplierNm: undefined,
},
treeProps: {
children: 'children',
@ -110,7 +108,8 @@ width="150" >
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -119,19 +118,57 @@ width="150" >
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'supplierCd', label: '客户编码'},
{prop: 'supplierNm', label: '客户名称'},
{prop: 'orgId', label: '所属公司ID'},
{prop: 'orgName', label: '公司代码'},
{prop: 'customerLevel', label: '客户等级'},
{prop: 'contactName', label: '联系人'},
{prop: 'address', label: '地址'},
{prop: 'contactPhone', label: '电话'},
{prop: 'status', label: '是否启用'},
columnList: [{
prop: 'supplierCd',
label: '客户编码'
},
{
prop: 'supplierNm',
label: '客户名称'
},
{
prop: 'orgId',
label: '所属公司ID'
},
{
prop: 'orgName',
label: '公司代码'
},
{
prop: 'customerLevel',
label: '客户等级'
},
{
prop: 'contactName',
label: '联系人'
},
{
prop: 'address',
label: '地址'
},
{
prop: 'contactPhone',
label: '电话'
},
{
prop: 'status',
label: '是否启用'
},
],
customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}],
customerLevelProps:{"label":"fullName","value":"id"},
customerLevelOptions: [{
"fullName": "一级",
"id": "1"
}, {
"fullName": "二级",
"id": "2"
}, {
"fullName": "三级",
"id": "3"
}],
customerLevelProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
@ -143,13 +180,17 @@ width="150" >
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -159,15 +200,15 @@ width="150" >
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/customer/Customer/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -193,8 +234,7 @@ width="150" >
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -225,8 +265,7 @@ width="150" >
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -241,7 +280,12 @@ width="150" >
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/customer/Customer/Actions/Export`,
method: 'GET',

@ -1,182 +1,169 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="12" >
<el-form-item label="物料编码"
prop="itemCode" >
<el-input v-model="dataForm.itemCode"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="物料编码" prop="itemCode">
<el-input v-model="dataForm.itemCode" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="物料名称"
prop="description" >
<el-input v-model="dataForm.description"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="物料名称" prop="description">
<el-input v-model="dataForm.description" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="库存组织代码"
prop="organizationCode" >
<el-input v-model="dataForm.organizationCode"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="库存组织代码" prop="organizationCode">
<el-input v-model="dataForm.organizationCode" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="主单位代码"
prop="primaryUomCode" >
<el-input v-model="dataForm.primaryUomCode"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="主单位代码" prop="primaryUomCode">
<el-input v-model="dataForm.primaryUomCode" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="主单位名称"
prop="primaryUnitOmeasure" >
<el-input v-model="dataForm.primaryUnitOmeasure"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="主单位名称" prop="primaryUnitOmeasure">
<el-input v-model="dataForm.primaryUnitOmeasure" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否可采购"
prop="purchaseFlag" >
<el-select v-model="dataForm.purchaseFlag"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in purchaseFlagOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="是否可采购" prop="purchaseFlag">
<el-select v-model="dataForm.purchaseFlag" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in purchaseFlagOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否可销售 "
prop="salesFlag" >
<el-select v-model="dataForm.salesFlag"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in salesFlagOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="是否可销售 " prop="salesFlag">
<el-select v-model="dataForm.salesFlag" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in salesFlagOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="默认出库区"
prop="outArea" >
<popupSelect v-model="dataForm.outArea"
placeholder="请选择" clearable field="outArea" interfaceId="381404161809350213" :columnOptions="outAreacolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
<el-col :span="12">
<el-form-item label="默认出库区" prop="outArea">
<popupSelect v-model="dataForm.outArea" placeholder="请选择" clearable field="outArea"
interfaceId="381404161809350213" :columnOptions="outAreacolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
popupTitle="选择数据" popupWidth="800px">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="默认入库区"
prop="inArea" >
<popupSelect v-model="dataForm.inArea"
placeholder="请选择" clearable field="inArea" interfaceId="381404161809350213" :columnOptions="inAreacolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
<el-col :span="12">
<el-form-item label="默认入库区" prop="inArea">
<popupSelect v-model="dataForm.inArea" placeholder="请选择" clearable field="inArea"
interfaceId="381404161809350213" :columnOptions="inAreacolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
popupTitle="选择数据" popupWidth="800px">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="创建人名称"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="创建人名称" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="创建时间"
prop="creatortime" >
<el-date-picker v-model="dataForm.creatortime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="12">
<el-form-item label="创建时间" prop="creatortime">
<el-date-picker v-model="dataForm.creatortime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="修改人名称"
prop="lastmodifyusername" >
<el-input v-model="dataForm.lastmodifyusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="修改人名称" prop="lastmodifyusername">
<el-input v-model="dataForm.lastmodifyusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="修改时间"
prop="lastmodifytime" >
<el-date-picker v-model="dataForm.lastmodifytime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="12">
<el-form-item label="修改时间" prop="lastmodifytime">
<el-date-picker v-model="dataForm.lastmodifytime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="生效状态"
prop="effectiveStatus" >
<el-select v-model="dataForm.effectiveStatus"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in effectiveStatusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="生效状态" prop="effectiveStatus">
<el-select v-model="dataForm.effectiveStatus" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in effectiveStatusOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="处理类型"
prop="processingType" >
<el-select v-model="dataForm.processingType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in processingTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="处理类型" prop="processingType">
<el-select v-model="dataForm.processingType" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in processingTypeOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="读取标记"
prop="readTag" >
<el-select v-model="dataForm.readTag"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in readTagOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="读取标记" prop="readTag">
<el-select v-model="dataForm.readTag" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in readTagOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="读取时间"
prop="readDate" >
<el-time-picker v-model="dataForm.readDate"
placeholder="请选择" clearable :style='{"width":"100%"}' format="HH:mm:ss" value-format="HH:mm:ss" :picker-options='{"selectableRange":"00:00:00-23:59:59"}'>
<el-col :span="12">
<el-form-item label="读取时间" prop="readDate">
<el-time-picker v-model="dataForm.readDate" placeholder="请选择" clearable
:style='{"width":"100%"}' format="HH:mm:ss" value-format="HH:mm:ss"
:picker-options='{"selectableRange":"00:00:00-23:59:59"}'>
</el-time-picker>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="错误信息"
prop="errorMessage" >
<el-input v-model="dataForm.errorMessage"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="错误信息" prop="errorMessage">
<el-input v-model="dataForm.errorMessage" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -186,8 +173,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -197,59 +188,113 @@
loading: false,
isDetail: false,
dataForm: {
itemCode : '',
description : '',
organizationCode : '',
primaryUomCode : '',
primaryUnitOmeasure : '',
purchaseFlag : "",
salesFlag : "",
outArea : "",
inArea : "",
creatorusername : '',
creatortime : '',
lastmodifyusername : '',
lastmodifytime : '',
effectiveStatus : "",
processingType : "",
readTag : "",
readDate : '',
errorMessage : '',
itemCode: '',
description: '',
organizationCode: '',
primaryUomCode: '',
primaryUnitOmeasure: '',
purchaseFlag: "",
salesFlag: "",
outArea: "",
inArea: "",
creatorusername: '',
creatortime: '',
lastmodifyusername: '',
lastmodifytime: '',
effectiveStatus: "",
processingType: "",
readTag: "",
readDate: '',
errorMessage: '',
},
rules:
{
itemCode: [
{
rules: {
itemCode: [{
required: true,
message: '请输入',
trigger: 'blur'
},
],
description: [
{
}, ],
description: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
},
purchaseFlagOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
salesFlagOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
outAreacolumnOptions: [{
"label": "库区编码",
"value": "areacode"
},
],
{
"label": "库区名称",
"value": "areaname"
},
{
"label": "仓库",
"value": "name"
},
{
"label": "最高库存",
"value": "maximum"
},],
inAreacolumnOptions: [{
"label": "库区编码",
"value": "areacode"
},
purchaseFlagOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
salesFlagOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
outAreacolumnOptions:[ {"label":"库区编号","value":"areacode"},{"label":"库区名称","value":"areaname"},{"label":"仓库名称","value":"name"},{"label":"最高库存","value":"maximum"},],
inAreacolumnOptions:[{"label":"库区编号","value":"areacode"},{"label":"库区名称","value":"areaname"},{"label":"仓库名称","value":"name"},{"label":"最高库存","value":"maximum"},],
effectiveStatusOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
processingTypeOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
readTagOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
{
"label": "库区名称",
"value": "areaname"
},
{
"label": "仓库",
"value": "name"
},
{
"label": "最高库存",
"value": "maximum"
},],
effectiveStatusOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
processingTypeOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
readTagOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -266,16 +311,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/Material/Material/'+this.dataForm.id,
url: '/api/Material/Material/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -290,7 +335,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/Material/Material',
@ -307,9 +352,9 @@
}
})
})
}else{
} else {
request({
url: '/api/Material/Material/'+this.dataForm.id,
url: '/api/Material/Material/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -325,15 +370,14 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
},
},
}
</script>

@ -27,108 +27,100 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="itemCode" label="物料编码" width="0" align="left"
/>
<el-table-column prop="description" label="物料名称" width="0" align="left"
/>
<el-table-column prop="outArea" label="默认出库区" width="0" align="left"
/>
<el-table-column prop="inArea" label="默认入库区" width="0" align="left"
/>
<el-table-column prop="primaryUnitOmeasure" label="主单位名称" width="0" align="left"
/>
<el-table-column label="是否可采购" width="0" prop="purchaseFlag" algin="left"
>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="itemCode" label="物料编码" width="0" align="left" />
<el-table-column prop="description" label="物料名称" width="0" align="left" />
<el-table-column prop="outArea" label="默认出库区" width="0" align="left" />
<el-table-column prop="inArea" label="默认入库区" width="0" align="left" />
<el-table-column prop="primaryUnitOmeasure" label="主单位名称" width="0" align="left" />
<el-table-column label="是否可采购" width="0" prop="purchaseFlag" algin="left">
<template slot-scope="scope">
{{ scope.row.purchaseFlag | dynamicText(purchaseFlagOptions) }}
</template>
</el-table-column>
<el-table-column label="是否可销售 " width="0" prop="salesFlag" algin="left"
>
<el-table-column label="是否可销售 " width="0" prop="salesFlag" algin="left">
<template slot-scope="scope">
{{ scope.row.salesFlag | dynamicText(salesFlagOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left"
/>
<el-table-column prop="creatortime" label="创建时间" width="0" align="left"
/>
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left"
/>
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left"
/>
<el-table-column label="生效状态" width="0" prop="effectiveStatus" algin="left"
>
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left" />
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" />
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left" />
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left" />
<el-table-column label="生效状态" width="0" prop="effectiveStatus" algin="left">
<template slot-scope="scope">
{{ scope.row.effectiveStatus | dynamicText(effectiveStatusOptions) }}
</template>
</el-table-column>
<el-table-column label="处理类型" width="0" prop="processingType" algin="left"
>
<el-table-column label="处理类型" width="0" prop="processingType" algin="left">
<template slot-scope="scope">
{{ scope.row.processingType | dynamicText(processingTypeOptions) }}
</template>
</el-table-column>
<el-table-column label="读取标记" width="0" prop="readTag" algin="left"
>
<el-table-column label="读取标记" width="0" prop="readTag" algin="left">
<template slot-scope="scope">
{{ scope.row.readTag | dynamicText(readTagOptions) }}
</template>
</el-table-column>
<el-table-column prop="readDate" label="读取时间" width="0" align="left"
/>
<el-table-column prop="errorMessage" label="错误信息" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="100" >
<el-table-column prop="readDate" label="读取时间" width="0" align="left" />
<el-table-column prop="errorMessage" label="错误信息" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
itemCode:undefined,
description:undefined,
itemCode: undefined,
description: undefined,
},
treeProps: {
children: 'children',
@ -137,7 +129,8 @@
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -146,34 +139,126 @@
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'itemCode', label: '物料编码'},
{prop: 'description', label: '物料名称'},
{prop: 'outArea', label: '默认出库区'},
{prop: 'inArea', label: '默认入库区'},
{prop: 'primaryUnitOmeasure', label: '主单位名称'},
{prop: 'purchaseFlag', label: '是否可采购'},
{prop: 'salesFlag', label: '是否可销售 '},
{prop: 'creatorusername', label: '创建人名称'},
{prop: 'creatortime', label: '创建时间'},
{prop: 'lastmodifyusername', label: '修改人名称'},
{prop: 'lastmodifytime', label: '修改时间'},
{prop: 'effectiveStatus', label: '生效状态'},
{prop: 'processingType', label: '处理类型'},
{prop: 'readTag', label: '读取标记'},
{prop: 'readDate', label: '读取时间'},
{prop: 'errorMessage', label: '错误信息'},
columnList: [{
prop: 'itemCode',
label: '物料编码'
},
{
prop: 'description',
label: '物料名称'
},
{
prop: 'outArea',
label: '默认出库区'
},
{
prop: 'inArea',
label: '默认入库区'
},
{
prop: 'primaryUnitOmeasure',
label: '主单位名称'
},
{
prop: 'purchaseFlag',
label: '是否可采购'
},
{
prop: 'salesFlag',
label: '是否可销售 '
},
{
prop: 'creatorusername',
label: '创建人名称'
},
{
prop: 'creatortime',
label: '创建时间'
},
{
prop: 'lastmodifyusername',
label: '修改人名称'
},
{
prop: 'lastmodifytime',
label: '修改时间'
},
{
prop: 'effectiveStatus',
label: '生效状态'
},
{
prop: 'processingType',
label: '处理类型'
},
{
prop: 'readTag',
label: '读取标记'
},
{
prop: 'readDate',
label: '读取时间'
},
{
prop: 'errorMessage',
label: '错误信息'
},
],
purchaseFlagOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
purchaseFlagProps:{"label":"fullName","value":"id"},
salesFlagOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
salesFlagProps:{"label":"fullName","value":"id"},
effectiveStatusOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
effectiveStatusProps:{"label":"fullName","value":"id"},
processingTypeOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
processingTypeProps:{"label":"fullName","value":"id"},
readTagOptions:[{"fullName":"Y","id":"Y"},{"fullName":"N","id":"N"}],
readTagProps:{"label":"fullName","value":"id"},
purchaseFlagOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
purchaseFlagProps: {
"label": "fullName",
"value": "id"
},
salesFlagOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
salesFlagProps: {
"label": "fullName",
"value": "id"
},
effectiveStatusOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
effectiveStatusProps: {
"label": "fullName",
"value": "id"
},
processingTypeOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
processingTypeProps: {
"label": "fullName",
"value": "id"
},
readTagOptions: [{
"fullName": "Y",
"id": "Y"
}, {
"fullName": "N",
"id": "N"
}],
readTagProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
@ -185,13 +270,17 @@
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -201,15 +290,15 @@
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/Material/Material/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -235,8 +324,7 @@
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -267,8 +355,7 @@
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -283,7 +370,12 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/Material/Material/Actions/Export`,
method: 'GET',

@ -1,103 +1,89 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="24" >
<el-form-item label="设备名称"
prop="mName" >
<el-input v-model="dataForm.mName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="设备名称" prop="mName">
<el-input v-model="dataForm.mName" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="设备序列号"
prop="serialnumber" >
<el-input v-model="dataForm.serialnumber"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="设备序列号" prop="serialnumber">
<el-input v-model="dataForm.serialnumber" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="ip地址"
prop="ip" >
<el-input v-model="dataForm.ip"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="ip地址" prop="ip">
<el-input v-model="dataForm.ip" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="端口号"
prop="port" >
<el-input v-model="dataForm.port"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="端口号" prop="port">
<el-input v-model="dataForm.port" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="账号"
prop="account" >
<el-input v-model="dataForm.account"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="账号" prop="account">
<el-input v-model="dataForm.account" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="密码"
prop="password" >
<el-input v-model="dataForm.password"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="密码" prop="password">
<el-input v-model="dataForm.password" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="创建人名称"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="创建人名称" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="创建时间"
prop="creatortime" >
<el-date-picker v-model="dataForm.creatortime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="24">
<el-form-item label="创建时间" prop="creatortime">
<el-date-picker v-model="dataForm.creatortime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="修改人名称"
prop="lastmodifyusername" >
<el-input v-model="dataForm.lastmodifyusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="修改人名称" prop="lastmodifyusername">
<el-input v-model="dataForm.lastmodifyusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="修改时间"
prop="lastmodifytime" >
<el-date-picker v-model="dataForm.lastmodifytime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="24">
<el-form-item label="修改时间" prop="lastmodifytime">
<el-date-picker v-model="dataForm.lastmodifytime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -107,8 +93,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -118,44 +108,38 @@
loading: false,
isDetail: false,
dataForm: {
mName : '',
serialnumber : '',
ip : '',
port : '',
account : '',
password : '',
creatorusername : '',
creatortime : '',
lastmodifyusername : '',
lastmodifytime : '',
mName: '',
serialnumber: '',
ip: '',
port: '',
account: '',
password: '',
creatorusername: '',
creatortime: '',
lastmodifyusername: '',
lastmodifytime: '',
},
rules:
{
mName: [
{
rules: {
mName: [{
required: true,
message: '请输入',
trigger: 'blur'
},
],
serialnumber: [
{
}, ],
serialnumber: [{
required: true,
message: '请输入',
trigger: 'blur'
},
],
}, ],
},
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -172,16 +156,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/monitormanage/Monitormanage/'+this.dataForm.id,
url: '/api/monitormanage/Monitormanage/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -196,7 +180,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/monitormanage/Monitormanage',
@ -213,9 +197,9 @@
}
})
})
}else{
} else {
request({
url: '/api/monitormanage/Monitormanage/'+this.dataForm.id,
url: '/api/monitormanage/Monitormanage/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -231,15 +215,14 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
},
},
}
</script>

@ -22,75 +22,73 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="mName" label="设备名称" width="0" align="left"
/>
<el-table-column prop="serialnumber" label="设备序列号" width="0" align="left"
/>
<el-table-column prop="ip" label="ip地址" width="0" align="left"
/>
<el-table-column prop="port" label="端口号" width="0" align="left"
/>
<el-table-column prop="account" label="账号" width="0" align="left"
/>
<el-table-column prop="password" label="密码" width="0" align="left"
/>
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left"
/>
<el-table-column prop="creatortime" label="创建时间" width="0" align="left"
/>
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left"
/>
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="100" >
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="mName" label="设备名称" width="0" align="left" />
<el-table-column prop="serialnumber" label="设备序列号" width="0" align="left" />
<el-table-column prop="ip" label="ip地址" width="0" align="left" />
<el-table-column prop="port" label="端口号" width="0" align="left" />
<el-table-column prop="account" label="账号" width="0" align="left" />
<el-table-column prop="password" label="密码" width="0" align="left" />
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left" />
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" />
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left" />
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
mName:undefined,
mName: undefined,
},
treeProps: {
children: 'children',
@ -99,7 +97,8 @@
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -108,17 +107,46 @@
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'mName', label: '设备名称'},
{prop: 'serialnumber', label: '设备序列号'},
{prop: 'ip', label: 'ip地址'},
{prop: 'port', label: '端口号'},
{prop: 'account', label: '账号'},
{prop: 'password', label: '密码'},
{prop: 'creatorusername', label: '创建人名称'},
{prop: 'creatortime', label: '创建时间'},
{prop: 'lastmodifyusername', label: '修改人名称'},
{prop: 'lastmodifytime', label: '修改时间'},
columnList: [{
prop: 'mName',
label: '设备名称'
},
{
prop: 'serialnumber',
label: '设备序列号'
},
{
prop: 'ip',
label: 'ip地址'
},
{
prop: 'port',
label: '端口号'
},
{
prop: 'account',
label: '账号'
},
{
prop: 'password',
label: '密码'
},
{
prop: 'creatorusername',
label: '创建人名称'
},
{
prop: 'creatortime',
label: '创建时间'
},
{
prop: 'lastmodifyusername',
label: '修改人名称'
},
{
prop: 'lastmodifytime',
label: '修改时间'
},
],
}
},
@ -131,13 +159,17 @@
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -147,15 +179,15 @@
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/monitormanage/Monitormanage/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -181,8 +213,7 @@
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -213,8 +244,7 @@
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -229,7 +259,12 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/monitormanage/Monitormanage/Actions/Export`,
method: 'GET',

@ -1,277 +1,248 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="12" >
<el-form-item label="物料编码"
prop="materialCode" >
<relationForm v-model="dataForm.materialCode"
placeholder="请选择" clearable field="materialCode" modelId ="294090217084722181" :columnOptions="materialCodecolumnOptions" relationField="selectField121" >
<el-col :span="12">
<el-form-item label="物料编码" prop="materialCode">
<relationForm v-model="dataForm.materialCode" placeholder="请选择" clearable
field="materialCode" modelId="294090217084722181"
:columnOptions="materialCodecolumnOptions" relationField="selectField121">
</relationForm>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="物料名称"
prop="materialName" >
<el-input v-model="dataForm.materialName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="dataForm.materialName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="销售合同"
prop="salesName" >
<relationForm v-model="dataForm.salesName"
placeholder="请选择" clearable field="salesName" modelId ="294090217084722181" :columnOptions="salesNamecolumnOptions" relationField="selectField121" >
<el-col :span="12">
<el-form-item label="销售合同" prop="salesName">
<relationForm v-model="dataForm.salesName" placeholder="请选择" clearable field="salesName"
modelId="294090217084722181" :columnOptions="salesNamecolumnOptions"
relationField="selectField121">
</relationForm>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="客户名称"
prop="customerName" >
<el-input v-model="dataForm.customerName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="dataForm.customerName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否垫资"
prop="advance" >
<el-select v-model="dataForm.advance"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="是否垫资" prop="advance">
<el-select v-model="dataForm.advance" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="销售价格"
prop="salesPrice" >
<el-input-number v-model="dataForm.salesPrice"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="运输方式"
prop="transportType" >
<el-select v-model="dataForm.transportType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="运输方式" prop="transportType">
<el-select v-model="dataForm.transportType" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in transportTypeOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="运费"
prop="departmentId" >
<el-input-number v-model="dataForm.departmentId"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="运费" prop="departmentId">
<el-input-number v-model="dataForm.departmentId" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="车号"
prop="licenseNo" >
<relationForm v-model="dataForm.licenseNo"
placeholder="请选择" clearable field="licenseNo" modelId ="294090217084722181" :columnOptions="licenseNocolumnOptions" relationField="selectField122" >
<el-col :span="12">
<el-form-item label="车号" prop="licenseNo">
<relationForm v-model="dataForm.licenseNo" placeholder="请选择" clearable field="licenseNo"
modelId="294090217084722181" :columnOptions="licenseNocolumnOptions"
relationField="selectField122">
</relationForm>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="业务员名称"
prop="businessName" >
<el-input v-model="dataForm.businessName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="业务员名称" prop="businessName">
<el-input v-model="dataForm.businessName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="磅单图片"
prop="poundPictures" >
<JNPF-UploadImg v-model="dataForm.poundPictures"
:fileSize="500" sizeUnit="MB" :limit="9" >
<el-col :span="24">
<el-form-item label="磅单图片" prop="poundPictures">
<JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="皮重"
prop="tareWeight" >
<el-input-number v-model="dataForm.tareWeight"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="毛重"
prop="grossWeight" >
<el-input-number v-model="dataForm.grossWeight"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="扣重"
prop="buckleWeight" >
<el-input-number v-model="dataForm.buckleWeight"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="净重"
prop="netWeight" >
<el-input-number v-model="dataForm.netWeight"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="备注"
prop="remark" >
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="司机名称"
prop="driverName" >
<el-input v-model="dataForm.driverName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="司机名称" prop="driverName">
<el-input v-model="dataForm.driverName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="车辆图片"
prop="vehiclePictures" >
<JNPF-UploadImg v-model="dataForm.vehiclePictures"
:fileSize="500" sizeUnit="MB" :limit="9" >
<el-col :span="24">
<el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="制单人"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="制单人" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="供应商名称"
prop="supplierName" >
<el-input v-model="dataForm.supplierName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="dataForm.supplierName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="采购合同"
prop="purchaseName" >
<relationForm v-model="dataForm.purchaseName"
placeholder="请选择" clearable field="purchaseName" modelId ="294090217084722181" :columnOptions="purchaseNamecolumnOptions" relationField="selectField121" >
<el-col :span="12">
<el-form-item label="采购合同" prop="purchaseName">
<relationForm v-model="dataForm.purchaseName" placeholder="请选择" clearable
field="purchaseName" modelId="294090217084722181"
:columnOptions="purchaseNamecolumnOptions" relationField="selectField121">
</relationForm>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="单位"
prop="unit" >
<el-select v-model="dataForm.unit"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="单位" prop="unit">
<el-select v-model="dataForm.unit" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="结算重量"
prop="settlement" >
<el-input v-model="dataForm.settlement"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="结算重量" prop="settlement">
<el-input v-model="dataForm.settlement" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="采购单价"
prop="purchasePrice" >
<el-input v-model="dataForm.purchasePrice"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="采购单价" prop="purchasePrice">
<el-input v-model="dataForm.purchasePrice" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="进项票日期"
prop="inputDate" >
<el-date-picker v-model="dataForm.inputDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="12">
<el-form-item label="进项票日期" prop="inputDate">
<el-date-picker v-model="dataForm.inputDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="销项票日期"
prop="outputDate" >
<el-date-picker v-model="dataForm.outputDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="12">
<el-form-item label="销项票日期" prop="outputDate">
<el-date-picker v-model="dataForm.outputDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="付款日期"
prop="payDate" >
<el-date-picker v-model="dataForm.payDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="12">
<el-form-item label="付款日期" prop="payDate">
<el-date-picker v-model="dataForm.payDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="回款日期"
prop="paymentDate" >
<el-date-picker v-model="dataForm.paymentDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="12">
<el-form-item label="回款日期" prop="paymentDate">
<el-date-picker v-model="dataForm.paymentDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="磅单日期"
prop="poundDate" >
<el-date-picker v-model="dataForm.poundDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="12">
<el-form-item label="磅单日期" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -281,8 +252,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -292,112 +267,127 @@
loading: false,
isDetail: false,
dataForm: {
materialCode : "",
materialName : '',
salesName : "",
customerName : '',
advance : "",
salesPrice : '',
transportType : "",
departmentId : 11.225,
licenseNo : "",
businessName : '',
poundPictures : [],
tareWeight : '',
grossWeight : '',
buckleWeight : '',
netWeight : '',
remark : '',
driverName : '',
vehiclePictures : [],
creatorusername : '',
supplierName : '',
purchaseName : "",
unit : "",
settlement : '',
purchasePrice : '',
inputDate : '',
outputDate : '',
payDate : '',
paymentDate : '',
poundDate : '',
materialCode: "",
materialName: '',
salesName: "",
customerName: '',
advance: "",
salesPrice: '',
transportType: "",
departmentId: 11.225,
licenseNo: "",
businessName: '',
poundPictures: [],
tareWeight: '',
grossWeight: '',
buckleWeight: '',
netWeight: '',
remark: '',
driverName: '',
vehiclePictures: [],
creatorusername: '',
supplierName: '',
purchaseName: "",
unit: "",
settlement: '',
purchasePrice: '',
inputDate: '',
outputDate: '',
payDate: '',
paymentDate: '',
poundDate: '',
},
rules:
{
materialCode: [
{
rules: {
materialCode: [{
required: true,
message: '请选择',
trigger: 'change'
},
],
salesName: [
{
}, ],
salesName: [{
required: true,
message: '请选择',
trigger: 'change'
},
],
licenseNo: [
{
}, ],
licenseNo: [{
required: true,
message: '请选择',
trigger: 'change'
},
],
poundPictures: [
{
}, ],
poundPictures: [{
required: true,
message: '请至少选择一个',
trigger: 'click'
},
],
tareWeight: [
{
}, ],
tareWeight: [{
required: true,
message: '数字文本',
trigger: ["blur","change"]
},
],
grossWeight: [
{
trigger: ["blur", "change"]
}, ],
grossWeight: [{
required: true,
message: '数字文本',
trigger: ["blur","change"]
},
],
buckleWeight: [
{
trigger: ["blur", "change"]
}, ],
buckleWeight: [{
required: true,
message: '数字文本',
trigger: ["blur","change"]
},
],
netWeight: [
{
trigger: ["blur", "change"]
}, ],
netWeight: [{
required: true,
message: '数字文本',
trigger: ["blur","change"]
},
],
trigger: ["blur", "change"]
}, ],
},
materialCodecolumnOptions:[ {"label":"事件等级","value":"selectField121"},],
salesNamecolumnOptions:[ {"label":"事件等级","value":"selectField121"},],
advanceOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"0"}],
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
licenseNocolumnOptions:[ {"label":"事件级别","value":"selectField122"},],
purchaseNamecolumnOptions:[ {"label":"事件等级","value":"selectField121"},],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
materialCodecolumnOptions: [{
"label": "事件等级",
"value": "selectField121"
}, ],
salesNamecolumnOptions: [{
"label": "事件等级",
"value": "selectField121"
}, ],
advanceOptions: [{
"fullName": "是",
"id": "1"
}, {
"fullName": "否",
"id": "0"
}],
transportTypeOptions: [{
"fullName": "汽运",
"id": "0"
}, {
"fullName": "船运",
"id": "1"
}, {
"fullName": "火车",
"id": "2"
}],
licenseNocolumnOptions: [{
"label": "事件级别",
"value": "selectField122"
}, ],
purchaseNamecolumnOptions: [{
"label": "事件等级",
"value": "selectField121"
}, ],
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -414,16 +404,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/poundlist/Poundlist/'+this.dataForm.id,
url: '/api/poundlist/Poundlist/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -438,7 +428,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/poundlist/Poundlist',
@ -455,9 +445,9 @@
}
})
})
}else{
} else {
request({
url: '/api/poundlist/Poundlist/'+this.dataForm.id,
url: '/api/poundlist/Poundlist/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -473,19 +463,18 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.poundPictures = JSON.stringify(_data.poundPictures)
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.poundPictures = JSON.parse( _dataAll.poundPictures)
_dataAll.vehiclePictures = JSON.parse( _dataAll.vehiclePictures)
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.poundPictures = JSON.parse(_dataAll.poundPictures)
_dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures)
this.dataForm = _dataAll
},
},
}
</script>

@ -22,109 +22,124 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="licenseNo" label="车号" width="0" align="left"
/>
<el-table-column prop="customerName" label="客户名称" width="0" align="left"
/>
<el-table-column prop="salesName" label="销售合同" width="0" align="left"
/>
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left"
/>
<el-table-column prop="purchaseName" label="采购合同" width="0" align="left"
/>
<el-table-column prop="materialCode" label="物料编码" width="0" align="left"
/>
<el-table-column prop="materialName" label="物料名称" width="0" align="left"
/>
<el-table-column label="是否垫资" width="0" prop="advance" algin="left"
>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="licenseNo" label="车号" width="0" align="left" />
<el-table-column prop="customerName" label="客户名称" width="0" align="left" />
<el-table-column prop="salesName" label="销售合同" width="0" align="left" />
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left" />
<el-table-column prop="purchaseName" label="采购合同" width="0" align="left" />
<el-table-column prop="materialCode" label="物料编码" width="0" align="left" />
<el-table-column prop="materialName" label="物料名称" width="0" align="left" />
<el-table-column label="是否垫资" width="0" prop="advance" algin="left">
<template slot-scope="scope">
{{ scope.row.advance | dynamicText(advanceOptions) }}
</template>
</el-table-column>
<el-table-column label="单位" width="0" prop="unit" algin="left"
>
<el-table-column label="单位" width="0" prop="unit" algin="left">
<template slot-scope="scope">
{{ scope.row.unit | dynamicText(unitOptions) }}
</template>
</el-table-column>
<el-table-column prop="grossWeight" label="毛重" width="0" align="left"
/>
<el-table-column prop="tareWeight" label="皮重" width="0" align="left"
/>
<el-table-column prop="buckleWeight" label="扣重" width="0" align="left"
/>
<el-table-column prop="netWeight" label="净重" width="0" align="left"
/>
<el-table-column prop="settlement" label="结算重量" width="0" align="left"
/>
<el-table-column prop="purchasePrice" label="采购单价" width="0" align="left"
/>
<el-table-column prop="salesPrice" label="销售价格" width="0" align="left"
/>
<el-table-column prop="inputDate" label="进项票日期" width="0" align="left"
/>
<el-table-column prop="outputDate" label="销项票日期" width="0" align="left"
/>
<el-table-column prop="payDate" label="付款日期" width="0" align="left"
/>
<el-table-column prop="paymentDate" label="回款日期" width="0" align="left"
/>
<el-table-column prop="poundDate" label="磅单日期" width="0" align="left"
/>
<el-table-column prop="businessName" label="业务员名称" width="0" align="left"
/>
<el-table-column prop="remark" label="备注" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="100" >
<el-table-column prop="grossWeight" label="毛重" width="0" align="left" />
<el-table-column prop="tareWeight" label="皮重" width="0" align="left" />
<el-table-column prop="buckleWeight" label="扣重" width="0" align="left" />
<el-table-column prop="netWeight" label="净重" width="0" align="left" />
<el-table-column prop="settlement" label="结算重量" width="0" align="left" />
<el-table-column prop="purchasePrice" label="采购单价" width="0" align="left" />
<el-table-column prop="salesPrice" label="销售价格" width="0" align="left" />
<el-table-column prop="inputDate" label="进项票日期" width="0" align="left" />
<el-table-column prop="outputDate" label="销项票日期" width="0" align="left" />
<el-table-column prop="payDate" label="付款日期" width="0" align="left" />
<el-table-column prop="paymentDate" label="回款日期" width="0" align="left" />
<el-table-column prop="poundDate" label="磅单日期" width="0" align="left" />
<el-table-column prop="businessName" label="业务员" width="0" align="left" />
<el-table-column prop="remark" label="备注" width="0" align="left" />
<el-table-column prop="poundPictures" label="磅单图片" width="0" align="left">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<img :src="`/dev${item.url}`" width="100%" />
<img
slot="reference"
:src="`/dev${item.url}`"
:alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
</el-popover>
</span>
</template>
</el-table-column>
<el-table-column prop="vehiclePictures" label="车辆图片" width="0" align="left">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<img :src="`/dev${item.url}`" width="100%" />
<img
slot="reference"
:src="`/dev${item.url}`"
:alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
</el-popover>
</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
materialName:undefined,
materialName: undefined,
},
treeProps: {
children: 'children',
@ -133,7 +148,8 @@
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -142,37 +158,135 @@
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'licenseNo', label: '车号'},
{prop: 'customerName', label: '客户名称'},
{prop: 'salesName', label: '销售合同'},
{prop: 'supplierName', label: '供应商名称'},
{prop: 'purchaseName', label: '采购合同'},
{prop: 'materialCode', label: '物料编码'},
{prop: 'materialName', label: '物料名称'},
{prop: 'advance', label: '是否垫资'},
{prop: 'unit', label: '单位'},
{prop: 'grossWeight', label: '毛重'},
{prop: 'tareWeight', label: '皮重'},
{prop: 'buckleWeight', label: '扣重'},
{prop: 'netWeight', label: '净重'},
{prop: 'settlement', label: '结算重量'},
{prop: 'purchasePrice', label: '采购单价'},
{prop: 'salesPrice', label: '销售价格'},
{prop: 'inputDate', label: '进项票日期'},
{prop: 'outputDate', label: '销项票日期'},
{prop: 'payDate', label: '付款日期'},
{prop: 'paymentDate', label: '回款日期'},
{prop: 'poundDate', label: '磅单日期'},
{prop: 'businessName', label: '业务员名称'},
{prop: 'remark', label: '备注'},
columnList: [{
prop: 'licenseNo',
label: '车号'
},
{
prop: 'customerName',
label: '客户名称'
},
{
prop: 'salesName',
label: '销售合同'
},
{
prop: 'supplierName',
label: '供应商名称'
},
{
prop: 'purchaseName',
label: '采购合同'
},
{
prop: 'materialCode',
label: '物料编码'
},
{
prop: 'materialName',
label: '物料名称'
},
{
prop: 'advance',
label: '是否垫资'
},
{
prop: 'unit',
label: '单位'
},
{
prop: 'grossWeight',
label: '毛重'
},
{
prop: 'tareWeight',
label: '皮重'
},
{
prop: 'buckleWeight',
label: '扣重'
},
{
prop: 'netWeight',
label: '净重'
},
{
prop: 'settlement',
label: '结算重量'
},
{
prop: 'purchasePrice',
label: '采购单价'
},
{
prop: 'salesPrice',
label: '销售价格'
},
{
prop: 'inputDate',
label: '进项票日期'
},
{
prop: 'outputDate',
label: '销项票日期'
},
{
prop: 'payDate',
label: '付款日期'
},
{
prop: 'paymentDate',
label: '回款日期'
},
{
prop: 'poundDate',
label: '磅单日期'
},
{
prop: 'businessName',
label: '业务员名称'
},
{
prop: 'remark',
label: '备注'
},
],
advanceOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"0"}],
advanceProps:{"label":"fullName","value":"id"},
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
transportTypeProps:{"label":"fullName","value":"id"},
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
unitProps:{"label":"fullName","value":"id"},
advanceOptions: [{
"fullName": "是",
"id": "1"
}, {
"fullName": "否",
"id": "0"
}],
advanceProps: {
"label": "fullName",
"value": "id"
},
transportTypeOptions: [{
"fullName": "汽运",
"id": "0"
}, {
"fullName": "船运",
"id": "1"
}, {
"fullName": "火车",
"id": "2"
}],
transportTypeProps: {
"label": "fullName",
"value": "id"
},
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
unitProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
@ -184,13 +298,17 @@
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -200,15 +318,15 @@
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/poundlist/Poundlist/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -234,8 +352,7 @@
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -266,8 +383,7 @@
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -282,7 +398,12 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/poundlist/Poundlist/Actions/Export`,
method: 'GET',

@ -1,171 +1,149 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="8" >
<el-form-item label="单据编号"
prop="documentno" >
<el-input v-model="dataForm.documentno"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="单据编号" prop="documentno">
<el-input v-model="dataForm.documentno" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="供应商名称"
prop="suppliername" >
<el-input v-model="dataForm.suppliername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="供应商名称" prop="suppliername">
<el-input v-model="dataForm.suppliername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="合同名称"
prop="contractname" >
<el-input v-model="dataForm.contractname"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="合同名称" prop="contractname">
<el-input v-model="dataForm.contractname" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="制单人"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="制单人" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="采购部门"
prop="departmentId" >
<dep-select v-model="dataForm.departmentId"
placeholder="请选择" clearable >
<el-col :span="8">
<el-form-item label="采购部门" prop="departmentId">
<dep-select v-model="dataForm.departmentId" placeholder="请选择" clearable>
</dep-select>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="对方合同号"
prop="contractno" >
<el-input v-model="dataForm.contractno"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="对方合同号" prop="contractno">
<el-input v-model="dataForm.contractno" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="数量"
prop="num" >
<el-input-number v-model="dataForm.num"
placeholder="数字文本" :step="1" controls-position='right' >
<el-col :span="8">
<el-form-item label="数量" prop="num">
<el-input-number v-model="dataForm.num" placeholder="数字文本" :step="1"
controls-position='right'>
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="金额"
prop="amount" >
<el-input v-model="dataForm.amount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="金额" prop="amount">
<el-input v-model="dataForm.amount" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="不含税金额"
prop="notamount" >
<el-input v-model="dataForm.notamount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="不含税金额" prop="notamount">
<el-input v-model="dataForm.notamount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="币别 "
prop="currency" >
<el-select v-model="dataForm.currency"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="8">
<el-form-item label="币别 " prop="currency">
<el-select v-model="dataForm.currency" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16" >
<el-form-item label="备注"
prop="remark" >
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="16">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="ERP订单号"
prop="erpno" >
<el-input v-model="dataForm.erpno"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="ERP订单号" prop="erpno">
<el-input v-model="dataForm.erpno" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="已付款金额"
prop="payprice" >
<el-input v-model="dataForm.payprice"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="已付款金额" prop="payprice">
<el-input v-model="dataForm.payprice" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="发票数量"
prop="invoicenum" >
<el-input v-model="dataForm.invoicenum"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="发票数量" prop="invoicenum">
<el-input v-model="dataForm.invoicenum" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="发票金额"
prop="invoiceamount" >
<el-input v-model="dataForm.invoiceamount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="发票金额" prop="invoiceamount">
<el-input v-model="dataForm.invoiceamount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="垫资金额"
prop="advanceamount" >
<el-input v-model="dataForm.advanceamount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<el-form-item label="垫资金额" prop="advanceamount">
<el-input v-model="dataForm.advanceamount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态"
prop="status" >
<el-select v-model="dataForm.status"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="8">
<el-form-item label="单据状态" prop="status">
<el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10" >
<el-form-item label="制单时间"
prop="creatortime" >
<el-date-picker v-model="dataForm.creatortime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="10">
<el-form-item label="制单时间" prop="creatortime">
<el-date-picker v-model="dataForm.creatortime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
@ -173,104 +151,113 @@
<el-col :span="24">
<el-tabs v-model="activebgsnko" tab-position="top" class="mb-20">
<el-tab-pane label="磅单明细">
<el-col :span="24" >
<el-col :span="24">
<el-form-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.purchaseorder_item0List" size='mini' >
<el-table :data="dataForm.purchaseorder_item0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="licensenum" label="车牌号">
<template slot-scope="scope">
<el-input v-model="scope.row.licensenum"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.licensenum" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="materialname" label="物料名称">
<template slot-scope="scope">
<el-input v-model="scope.row.materialname"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.materialname" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="pounttype" label="类型 ">
<template slot-scope="scope">
<el-select v-model="scope.row.pounttype"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in pounttypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-select v-model="scope.row.pounttype" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in pounttypeOptions"
:key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="netweight" label="净重">
<template slot-scope="scope">
<el-input v-model="scope.row.netweight"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.netweight" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="单位">
<template slot-scope="scope">
<el-select v-model="scope.row.unit"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-select v-model="scope.row.unit" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in unitOptions" :key="index"
:label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="advance" label="是否垫资">
<template slot-scope="scope">
<el-select v-model="scope.row.advance"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-select v-model="scope.row.advance" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in advanceOptions" :key="index"
:label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="price" label="单价">
<template slot-scope="scope">
<el-input v-model="scope.row.price"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.price" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="settlement" label="结算重量">
<template slot-scope="scope">
<el-input v-model="scope.row.settlement"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.settlement" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率 ">
<template slot-scope="scope">
<el-select v-model="scope.row.rate"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-select v-model="scope.row.rate" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in rateOptions" :key="index"
:label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.amount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="notamount" label="不含税金额">
<template slot-scope="scope">
<el-input v-model="scope.row.notamount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.notamount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.remark" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="50" >
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delpurchaseorder_item0List(scope.$index)"></el-button>
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delpurchaseorder_item0List(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -279,11 +266,11 @@
</div>
</el-form-item>
</el-col>
</el-tab-pane >
</el-tab-pane>
</el-tabs>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -293,8 +280,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -304,53 +295,113 @@
loading: false,
isDetail: false,
dataForm: {
documentno : '',
suppliername : '',
contractname : '',
creatorusername : '',
departmentId : '',
contractno : '',
num : '',
amount : '',
notamount : '',
currency : "",
remark : '',
erpno : '',
payprice : '',
invoicenum : '',
invoiceamount : '',
advanceamount : '',
status : "",
creatortime : '',
purchaseorder_item0List:[],
},
activebgsnko:'0',
rules:
{
documentno: '',
suppliername: '',
contractname: '',
creatorusername: '',
departmentId: '',
contractno: '',
num: '',
amount: '',
notamount: '',
currency: "",
remark: '',
erpno: '',
payprice: '',
invoicenum: '',
invoiceamount: '',
advanceamount: '',
status: "",
creatortime: '',
purchaseorder_item0List: [],
},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"开票中","id":"1"},{"fullName":"付款申请","id":"2"},{"fullName":"待付款","id":"3"},{"fullName":"付款中","id":"4"},{"fullName":"归档","id":"5"}],
activebgsnko: '0',
rules: {},
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "开票中",
"id": "1"
}, {
"fullName": "付款申请",
"id": "2"
}, {
"fullName": "待付款",
"id": "3"
}, {
"fullName": "付款中",
"id": "4"
}, {
"fullName": "归档",
"id": "5"
}],
pounttypeOptions:[{"fullName":"贸易","id":"0"},{"fullName":"其他","id":"1"}],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
advanceOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"0"}],
rateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
pounttypeOptions: [{
"fullName": "贸易",
"id": "0"
}, {
"fullName": "其他",
"id": "1"
}],
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
advanceOptions: [{
"fullName": "是",
"id": "1"
}, {
"fullName": "否",
"id": "0"
}],
rateOptions: [{
"fullName": "13",
"id": "0"
}, {
"fullName": "9",
"id": "1"
}, {
"fullName": "6",
"id": "2"
}, {
"fullName": "5",
"id": "3"
}, {
"fullName": "3",
"id": "4"
}, {
"fullName": "0",
"id": "5"
}],
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
purchaseorder_item0Exist() {
let isOk = true;
for(let i=0;i<this.dataForm.purchaseorder_item0List.length;i++){
for (let i = 0; i < this.dataForm.purchaseorder_item0List.length; i++) {
const e = this.dataForm.purchaseorder_item0List[i];
}
return isOk;
},
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -367,16 +418,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/purchaseorder/Purchaseorder/'+this.dataForm.id,
url: '/api/purchaseorder/Purchaseorder/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -392,7 +443,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/purchaseorder/Purchaseorder',
@ -409,9 +460,9 @@
}
})
})
}else{
} else {
request({
url: '/api/purchaseorder/Purchaseorder/'+this.dataForm.id,
url: '/api/purchaseorder/Purchaseorder/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -427,41 +478,40 @@
})
}
},
addpurchaseorder_item0List(){
addpurchaseorder_item0List() {
let item = {
licensenum:undefined,
materialname:undefined,
pounttype:undefined,
netweight:undefined,
unit:undefined,
advance:undefined,
price:undefined,
settlement:undefined,
rate:undefined,
amount:undefined,
notamount:undefined,
remark:undefined,
licensenum: undefined,
materialname: undefined,
pounttype: undefined,
netweight: undefined,
unit: undefined,
advance: undefined,
price: undefined,
settlement: undefined,
rate: undefined,
amount: undefined,
notamount: undefined,
remark: undefined,
}
this.dataForm.purchaseorder_item0List.push(item)
},
delpurchaseorder_item0List(index) {
this.dataForm.purchaseorder_item0List.splice(index, 1);
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
for(let i=0;i<_data.purchaseorder_item0List.length;i++){
for (let i = 0; i < _data.purchaseorder_item0List.length; i++) {
var _list = _data.purchaseorder_item0List[i];
}
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
for(let i=0;i<_dataAll.purchaseorder_item0List.length;i++){
dataInfo(dataAll) {
let _dataAll = dataAll
for (let i = 0; i < _dataAll.purchaseorder_item0List.length; i++) {
var _list = _dataAll.purchaseorder_item0List[i];
}
this.dataForm = _dataAll
},
},
}
</script>

@ -22,91 +22,85 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="documentno" label="单据编号" width="0" align="left"
/>
<el-table-column prop="erpno" label="ERP订单号" width="0" align="left"
/>
<el-table-column prop="contractname" label="合同名称" width="0" align="left"
/>
<el-table-column prop="suppliername" label="供应商名称" width="0" align="left"
/>
<el-table-column prop="amount" label="金额" width="0" align="left"
/>
<el-table-column prop="num" label="数量" width="0" align="left"
/>
<el-table-column label="币别 " width="0" prop="currency" algin="left"
>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="documentno" label="单据编号" width="0" align="left" />
<el-table-column prop="erpno" label="ERP订单号" width="0" align="left" />
<el-table-column prop="contractname" label="合同名称" width="0" align="left" />
<el-table-column prop="suppliername" label="供应商名称" width="0" align="left" />
<el-table-column prop="amount" label="金额" width="0" align="left" />
<el-table-column prop="num" label="数量" width="0" align="left" />
<el-table-column label="币别 " width="0" prop="currency" algin="left">
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="payprice" label="已付款金额" width="0" align="left"
/>
<el-table-column prop="invoicenum" label="发票数量" width="0" align="left"
/>
<el-table-column prop="invoiceamount" label="发票金额" width="0" align="left"
/>
<el-table-column prop="advanceamount" label="垫资金额" width="0" align="left"
/>
<el-table-column prop="creatortime" label="制单时间" width="0" align="left"
/>
<el-table-column label="单据状态" width="0" prop="status" algin="left"
>
<el-table-column prop="payprice" label="已付款金额" width="0" align="left" />
<el-table-column prop="invoicenum" label="发票数量" width="0" align="left" />
<el-table-column prop="invoiceamount" label="发票金额" width="0" align="left" />
<el-table-column prop="advanceamount" label="垫资金额" width="0" align="left" />
<el-table-column prop="creatortime" label="制单时间" width="0" align="left" />
<el-table-column label="单据状态" width="0" prop="status" algin="left">
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorusername" label="制单人" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="100" >
<el-table-column prop="creatorusername" label="制单人" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
documentno:undefined,
documentno: undefined,
},
treeProps: {
children: 'children',
@ -115,7 +109,8 @@
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -124,26 +119,100 @@
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'documentno', label: '单据编号'},
{prop: 'erpno', label: 'ERP订单号'},
{prop: 'contractname', label: '合同名称'},
{prop: 'suppliername', label: '供应商名称'},
{prop: 'amount', label: '金额'},
{prop: 'num', label: '数量'},
{prop: 'currency', label: '币别 '},
{prop: 'payprice', label: '已付款金额'},
{prop: 'invoicenum', label: '发票数量'},
{prop: 'invoiceamount', label: '发票金额'},
{prop: 'advanceamount', label: '垫资金额'},
{prop: 'creatortime', label: '制单时间'},
{prop: 'status', label: '单据状态'},
{prop: 'creatorusername', label: '制单人'},
columnList: [{
prop: 'documentno',
label: '单据编号'
},
{
prop: 'erpno',
label: 'ERP订单号'
},
{
prop: 'contractname',
label: '合同名称'
},
{
prop: 'suppliername',
label: '供应商名称'
},
{
prop: 'amount',
label: '金额'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'currency',
label: '币别 '
},
{
prop: 'payprice',
label: '已付款金额'
},
{
prop: 'invoicenum',
label: '发票数量'
},
{
prop: 'invoiceamount',
label: '发票金额'
},
{
prop: 'advanceamount',
label: '垫资金额'
},
{
prop: 'creatortime',
label: '制单时间'
},
{
prop: 'status',
label: '单据状态'
},
{
prop: 'creatorusername',
label: '制单人'
},
],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"开票中","id":"1"},{"fullName":"付款申请","id":"2"},{"fullName":"待付款","id":"3"},{"fullName":"付款中","id":"4"},{"fullName":"归档","id":"5"}],
statusProps:{"label":"fullName","value":"id"},
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
currencyProps: {
"label": "fullName",
"value": "id"
},
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "开票中",
"id": "1"
}, {
"fullName": "付款申请",
"id": "2"
}, {
"fullName": "待付款",
"id": "3"
}, {
"fullName": "付款中",
"id": "4"
}, {
"fullName": "归档",
"id": "5"
}],
statusProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
@ -155,13 +224,17 @@
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -171,15 +244,15 @@
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/purchaseorder/Purchaseorder/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -205,8 +278,7 @@
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -237,8 +309,7 @@
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -253,7 +324,12 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/purchaseorder/Purchaseorder/Actions/Export`,
method: 'GET',

@ -1,132 +1,114 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="600px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="24" >
<el-form-item label="库区编码"
prop="areacode" >
<el-input v-model="dataForm.areacode"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="库区编码" prop="areacode">
<el-input v-model="dataForm.areacode" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="库区名称"
prop="areaname" >
<el-input v-model="dataForm.areaname"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="库区名称" prop="areaname">
<el-input v-model="dataForm.areaname" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="最高库存"
prop="maximum" >
<el-input-number v-model="dataForm.maximum"
placeholder="数字文本" :step="1" >
<el-col :span="24">
<el-form-item label="最高库存" prop="maximum">
<el-input-number v-model="dataForm.maximum" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="安全库存"
prop="safety" >
<el-input-number v-model="dataForm.safety"
placeholder="数字文本" :step="1" >
<el-col :span="24">
<el-form-item label="安全库存" prop="safety">
<el-input-number v-model="dataForm.safety" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="最低库存"
prop="minimum" >
<el-input-number v-model="dataForm.minimum"
placeholder="数字文本" :step="1" >
<el-col :span="24">
<el-form-item label="最低库存" prop="minimum">
<el-input-number v-model="dataForm.minimum" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="计量单位"
prop="unit" >
<el-select v-model="dataForm.unit"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="24">
<el-form-item label="计量单位" prop="unit">
<el-select v-model="dataForm.unit" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="仓库"
prop="warehouseId" >
<popupSelect v-model="dataForm.warehouseId"
placeholder="请选择" clearable field="warehouseId" interfaceId="380988259175524165" :columnOptions="warehouseIdcolumnOptions" propsValue="id" relationField="name" popupType="dialog"
popupTitle="选择数据" popupWidth="800px">
<el-col :span="24">
<el-form-item label="仓库" prop="warehouseId">
<popupSelect v-model="dataForm.warehouseId" placeholder="请选择" clearable field="warehouseId"
interfaceId="380988259175524165" :columnOptions="warehouseIdcolumnOptions"
propsValue="id" relationField="name" popupType="dialog" popupTitle="选择数据"
popupWidth="800px">
</popupSelect >
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="组织"
prop="orgnizeId" >
<com-select v-model="dataForm.orgnizeId"
placeholder="请选择" clearable >
<el-col :span="24">
<el-form-item label="组织" prop="orgnizeId">
<com-select v-model="dataForm.orgnizeId" placeholder="请选择" clearable>
</com-select>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="部门"
prop="departmentId" >
<dep-select v-model="dataForm.departmentId"
placeholder="请选择" clearable >
<el-col :span="24">
<el-form-item label="部门" prop="departmentId">
<dep-select v-model="dataForm.departmentId" placeholder="请选择" clearable>
</dep-select>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="创建时间"
prop="creatortime" >
<el-date-picker v-model="dataForm.creatortime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="24">
<el-form-item label="创建时间" prop="creatortime">
<el-date-picker v-model="dataForm.creatortime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="创建人名称"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="创建人名称" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="修改时间"
prop="lastmodifytime" >
<el-date-picker v-model="dataForm.lastmodifytime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="24">
<el-form-item label="修改时间" prop="lastmodifytime">
<el-date-picker v-model="dataForm.lastmodifytime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="修改人名称"
prop="lastmodifyusername" >
<el-input v-model="dataForm.lastmodifyusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="修改人名称" prop="lastmodifyusername">
<el-input v-model="dataForm.lastmodifyusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -136,8 +118,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -147,42 +133,53 @@
loading: false,
isDetail: false,
dataForm: {
areacode : '',
areaname : '',
maximum : 1,
safety : 1,
minimum : 1,
unit : "",
warehouseId : "",
orgnizeId : '',
departmentId : '',
creatortime : '',
creatorusername : '',
lastmodifytime : '',
lastmodifyusername : '',
areacode: '',
areaname: '',
maximum: 1,
safety: 1,
minimum: 1,
unit: "",
warehouseId: "",
orgnizeId: '',
departmentId: '',
creatortime: '',
creatorusername: '',
lastmodifytime: '',
lastmodifyusername: '',
},
rules:
{
areacode: [
{
rules: {
areacode: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
},
],
},
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
warehouseIdcolumnOptions:[ {"label":"ID","value":"id"}, {"label":"仓库号","value":"code"}, {"label":"仓库名称","value":"name"},],
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
warehouseIdcolumnOptions: [{
"label": "ID",
"value": "id"
}, {
"label": "仓库号",
"value": "code"
}, {
"label": "仓库名称",
"value": "name"
}, ],
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -199,16 +196,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/reservoirarea/Reservoirarea/'+this.dataForm.id,
url: '/api/reservoirarea/Reservoirarea/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -223,7 +220,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/reservoirarea/Reservoirarea',
@ -240,9 +237,9 @@
}
})
})
}else{
} else {
request({
url: '/api/reservoirarea/Reservoirarea/'+this.dataForm.id,
url: '/api/reservoirarea/Reservoirarea/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -258,17 +255,16 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.orgnizeId = JSON.stringify(_data.orgnizeId)
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.orgnizeId = JSON.parse( _dataAll.orgnizeId)
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.orgnizeId = JSON.parse(_dataAll.orgnizeId)
this.dataForm = _dataAll
},
},
}
</script>

@ -27,86 +27,81 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="areacode" label="库区编码" width="0" align="left"
/>
<el-table-column prop="areaname" label="库区名称" width="0" align="left"
/>
<el-table-column prop="maximum" label="最高库存" width="0" align="left"
/>
<el-table-column prop="safety" label="安全库存" width="0" align="left"
/>
<el-table-column prop="minimum" label="最低库存" width="0" align="left"
/>
<el-table-column label="计量单位" width="0" prop="unit" algin="left"
>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="areacode" label="库区编码" width="0" align="left" />
<el-table-column prop="areaname" label="库区名称" width="0" align="left" />
<el-table-column prop="maximum" label="最高库存" width="0" align="left" />
<el-table-column prop="safety" label="安全库存" width="0" align="left" />
<el-table-column prop="minimum" label="最低库存" width="0" align="left" />
<el-table-column label="计量单位" width="0" prop="unit" algin="left">
<template slot-scope="scope">
{{ scope.row.unit | dynamicText(unitOptions) }}
</template>
</el-table-column>
<el-table-column prop="warehouseId" label="仓库" width="0" align="left"
/>
<el-table-column prop="orgnizeId" label="组织" width="0" align="left"
/>
<el-table-column prop="departmentId" label="部门" width="0" align="left"
/>
<el-table-column prop="creatortime" label="创建时间" width="0" align="left"
/>
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left"
/>
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left"
/>
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="100" >
<el-table-column prop="warehouseId" label="仓库" width="0" align="left" />
<el-table-column prop="orgnizeId" label="组织" width="0" align="left" />
<el-table-column prop="departmentId" label="部门" width="0" align="left" />
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" />
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left" />
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left" />
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
areacode:undefined,
areaname:undefined,
areacode: undefined,
areaname: undefined,
},
treeProps: {
children: 'children',
@ -115,7 +110,8 @@
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -124,23 +120,70 @@
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'areacode', label: '库区编码'},
{prop: 'areaname', label: '库区名称'},
{prop: 'maximum', label: '最高库存'},
{prop: 'safety', label: '安全库存'},
{prop: 'minimum', label: '最低库存'},
{prop: 'unit', label: '计量单位'},
{prop: 'warehouseId', label: '仓库'},
{prop: 'orgnizeId', label: '组织'},
{prop: 'departmentId', label: '部门'},
{prop: 'creatortime', label: '创建时间'},
{prop: 'creatorusername', label: '创建人名称'},
{prop: 'lastmodifytime', label: '修改时间'},
{prop: 'lastmodifyusername', label: '修改人名称'},
columnList: [{
prop: 'areacode',
label: '库区编码'
},
{
prop: 'areaname',
label: '库区名称'
},
{
prop: 'maximum',
label: '最高库存'
},
{
prop: 'safety',
label: '安全库存'
},
{
prop: 'minimum',
label: '最低库存'
},
{
prop: 'unit',
label: '计量单位'
},
{
prop: 'warehouseId',
label: '仓库'
},
{
prop: 'orgnizeId',
label: '组织'
},
{
prop: 'departmentId',
label: '部门'
},
{
prop: 'creatortime',
label: '创建时间'
},
{
prop: 'creatorusername',
label: '创建人名称'
},
{
prop: 'lastmodifytime',
label: '修改时间'
},
{
prop: 'lastmodifyusername',
label: '修改人名称'
},
],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
unitProps:{"label":"fullName","value":"id"},
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
unitProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
@ -152,13 +195,17 @@
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -168,15 +215,15 @@
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/reservoirarea/Reservoirarea/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -202,8 +249,7 @@
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -234,8 +280,7 @@
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -250,7 +295,12 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/reservoirarea/Reservoirarea/Actions/Export`,
method: 'GET',

@ -1,120 +1,109 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="24" >
<el-col :span="24">
<el-form-item label-width="0">
<JNPF-Text :style='{"width":"100%"}'
:textStyle='{"color":"#000000","font-weight":"bold","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}' value="供应商编辑">
:textStyle='{"color":"#000000","font-weight":"bold","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}'
value="供应商编辑">
</JNPF-Text>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="供应商编码"
prop="supplierCode" >
<el-input v-model="dataForm.supplierCode"
placeholder="请输入供应商编码" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="供应商编码" prop="supplierCode">
<el-input v-model="dataForm.supplierCode" placeholder="请输入供应商编码" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="供应商名称"
prop="supplierName" >
<el-input v-model="dataForm.supplierName"
placeholder="请输入供应商名称" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="dataForm.supplierName" placeholder="请输入供应商名称" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="地点ID"
prop="supplierSiteId" >
<el-input v-model="dataForm.supplierSiteId"
placeholder="请输入供应商地点ID" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="地点ID" prop="supplierSiteId">
<el-input v-model="dataForm.supplierSiteId" placeholder="请输入供应商地点ID" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="地点名称"
prop="supplierSiteCode" >
<el-input v-model="dataForm.supplierSiteCode"
placeholder="请输入供应商地点名称" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="地点名称" prop="supplierSiteCode">
<el-input v-model="dataForm.supplierSiteCode" placeholder="请输入供应商地点名称" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="所属公司编码"
prop="companyId" >
<el-input v-model="dataForm.companyId"
placeholder="请输入所属公司编码" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="所属公司编码" prop="companyId">
<el-input v-model="dataForm.companyId" placeholder="请输入所属公司编码" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="所属公司名称"
prop="companyName" >
<el-input v-model="dataForm.companyName"
placeholder="请输入公司名称" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="所属公司名称" prop="companyName">
<el-input v-model="dataForm.companyName" placeholder="请输入公司名称" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="联系人"
prop="contactName" >
<el-input v-model="dataForm.contactName"
placeholder="请输入联系人" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="联系人" prop="contactName">
<el-input v-model="dataForm.contactName" placeholder="请输入联系人" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="联系电话"
prop="contactPhone" >
<el-input v-model="dataForm.contactPhone"
placeholder="请输入联系电话" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="联系电话" prop="contactPhone">
<el-input v-model="dataForm.contactPhone" placeholder="请输入联系电话" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="供应商等级"
prop="supplierLevel" >
<el-select v-model="dataForm.supplierLevel"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in supplierLevelOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="供应商等级" prop="supplierLevel">
<el-select v-model="dataForm.supplierLevel" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in supplierLevelOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="地址"
prop="address" >
<el-input v-model="dataForm.address"
placeholder="请输入地址" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="地址" prop="address">
<el-input v-model="dataForm.address" placeholder="请输入地址" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="启用"
prop="status" >
<el-switch v-model="dataForm.status"
:active-value="1" :inactive-value="0" >
<el-col :span="12">
<el-form-item label="启用" prop="status">
<el-switch v-model="dataForm.status" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -124,8 +113,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -135,46 +128,52 @@
loading: false,
isDetail: false,
dataForm: {
supplierCode : '',
supplierName : '',
supplierSiteId : '',
supplierSiteCode : '',
companyId : '',
companyName : '',
contactName : '',
contactPhone : '',
supplierLevel : "1",
address : '',
status : 1,
supplierCode: '',
supplierName: '',
supplierSiteId: '',
supplierSiteCode: '',
companyId: '',
companyName: '',
contactName: '',
contactPhone: '',
supplierLevel: "1",
address: '',
status: 1,
},
rules:
{
supplierCode: [
{
rules: {
supplierCode: [{
required: true,
message: '请输入供应商编码',
trigger: 'blur'
},
],
supplierName: [
{
}, ],
supplierName: [{
required: true,
message: '请输入供应商名称',
trigger: 'blur'
}, ],
},
],
},
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}],
supplierLevelOptions: [{
"fullName": "一级",
"id": "1"
}, {
"fullName": "二级",
"id": "2"
}, {
"fullName": "三级",
"id": "3"
}, {
"fullName": "四级",
"id": "4"
}],
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -191,16 +190,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/supplier/Supplier/'+this.dataForm.id,
url: '/api/supplier/Supplier/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -215,7 +214,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/supplier/Supplier',
@ -232,9 +231,9 @@
}
})
})
}else{
} else {
request({
url: '/api/supplier/Supplier/'+this.dataForm.id,
url: '/api/supplier/Supplier/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -250,17 +249,16 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.status = parseInt(_data.status)
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.status = parseInt( _dataAll.status)
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.status = parseInt(_dataAll.status)
this.dataForm = _dataAll
},
},
}
</script>

@ -27,45 +27,36 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="supplierCode" label="供应商编码" width="0" align="left"
sortable="custom" />
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left"
sortable="custom" />
<el-table-column prop="supplierSiteId" label="地点ID" width="0" align="left"
sortable="custom" />
<el-table-column prop="supplierSiteCode" label="地点名称" width="0" align="left"
sortable="custom" />
<el-table-column prop="companyId" label="所属公司编码" width="0" align="left"
sortable="custom" />
<el-table-column prop="companyName" label="所属公司名称" width="0" align="left"
sortable="custom" />
<el-table-column prop="contactName" label="联系人" width="0" align="left"
sortable="custom" />
<el-table-column prop="contactPhone" label="联系电话" width="0" align="left"
sortable="custom" />
<el-table-column label="供应商等级" width="0" prop="supplierLevel" algin="left"
sortable="custom" >
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="supplierCode" label="供应商编码" width="0" align="left" sortable="custom" />
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left" sortable="custom" />
<el-table-column prop="supplierSiteId" label="地点ID" width="0" align="left" sortable="custom" />
<el-table-column prop="supplierSiteCode" label="地点名称" width="0" align="left" sortable="custom" />
<el-table-column prop="companyId" label="所属公司编码" width="0" align="left" sortable="custom" />
<el-table-column prop="companyName" label="所属公司名称" width="0" align="left" sortable="custom" />
<el-table-column prop="contactName" label="联系人" width="0" align="left" sortable="custom" />
<el-table-column prop="contactPhone" label="联系电话" width="0" align="left" sortable="custom" />
<el-table-column label="供应商等级" width="0" prop="supplierLevel" algin="left" sortable="custom">
<template slot-scope="scope">
{{ scope.row.supplierLevel | dynamicText(supplierLevelOptions) }}
</template>
</el-table-column>
<el-table-column prop="address" label="地址" width="0" align="left"
sortable="custom" />
<!-- <el-table-column prop="status" label="启用" width="0" align="left"
<el-table-column prop="address" label="地址" width="0" align="left" sortable="custom" />
<!-- <el-table-column prop="status" label="启用" width="0" align="left"
sortable="custom" /> -->
<el-table-column prop="status" label="状态" width="0" align="left">
@ -77,45 +68,51 @@
</el-table-column>
<el-table-column label="操作" fixed="right"
width="150" >
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
supplierCode:undefined,
supplierName:undefined,
supplierCode: undefined,
supplierName: undefined,
},
treeProps: {
children: 'children',
@ -124,7 +121,8 @@ width="150" >
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -133,21 +131,68 @@ width="150" >
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'supplierCode', label: '供应商编码'},
{prop: 'supplierName', label: '供应商名称'},
{prop: 'supplierSiteId', label: '地点ID'},
{prop: 'supplierSiteCode', label: '地点名称'},
{prop: 'companyId', label: '所属公司编码'},
{prop: 'companyName', label: '所属公司名称'},
{prop: 'contactName', label: '联系人'},
{prop: 'contactPhone', label: '联系电话'},
{prop: 'supplierLevel', label: '供应商等级'},
{prop: 'address', label: '地址'},
{prop: 'status', label: '启用'},
columnList: [{
prop: 'supplierCode',
label: '供应商编码'
},
{
prop: 'supplierName',
label: '供应商名称'
},
{
prop: 'supplierSiteId',
label: '地点ID'
},
{
prop: 'supplierSiteCode',
label: '地点名称'
},
{
prop: 'companyId',
label: '所属公司编码'
},
{
prop: 'companyName',
label: '所属公司名称'
},
{
prop: 'contactName',
label: '联系人'
},
{
prop: 'contactPhone',
label: '联系电话'
},
{
prop: 'supplierLevel',
label: '供应商等级'
},
{
prop: 'address',
label: '地址'
},
{
prop: 'status',
label: '启用'
},
],
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}],
supplierLevelProps:{"label":"fullName","value":"id"},
supplierLevelOptions: [{
"fullName": "一级",
"id": "1"
}, {
"fullName": "二级",
"id": "2"
}, {
"fullName": "三级",
"id": "3"
}, {
"fullName": "四级",
"id": "4"
}],
supplierLevelProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
@ -159,13 +204,17 @@ width="150" >
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -175,15 +224,15 @@ width="150" >
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/supplier/Supplier/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -209,8 +258,7 @@ width="150" >
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -241,8 +289,7 @@ width="150" >
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -257,7 +304,12 @@ width="150" >
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/supplier/Supplier/Actions/Export`,
method: 'GET',

@ -1,10 +1,9 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="12" >
<el-form-item label="物料编码"
@ -16,7 +15,7 @@
</popupSelect>
</el-form-item>
</el-col>
<!-- <el-col :span="12" >
<el-col :span="12" >
<el-form-item label="物料名称"
prop="materialName" >
<el-input v-model="dataForm.materialName"
@ -24,173 +23,149 @@
</el-input>
</el-form-item>
</el-col> -->
<el-col :span="12" >
</el-col>
<!-- <el-col :span="12" >
<el-form-item label="物料名称"
>
<popupAttr
relationField="materialCode" showField="description" >
v-model="dataForm.materialCode"
</popupAttr>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="销售合同"
prop="salesName" >
<relationForm v-model="dataForm.salesName"
placeholder="请选择" clearable field="salesName" modelId ="294090217084722181" :columnOptions="salesNamecolumnOptions" relationField="selectField121" >
</relationForm>
</el-col>-->
<el-col :span="12">
<el-form-item label="销售合同" prop="salesName">
<popupSelect v-model="dataForm.salesName" placeholder="请选择" clearable field="salesName"
interfaceId="381038993740949317" :columnOptions="salesNamecolumnOptions" propsValue="id" relationField="contract_name" popupType="dialog"
popupTitle="选择数据" popupWidth="800px">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="客户名称"
prop="customerName" >
<el-input v-model="dataForm.customerName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="dataForm.customerName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否垫资"
prop="advance" >
<el-select v-model="dataForm.advance"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="是否垫资" prop="advance">
<el-select v-model="dataForm.advance" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="销售价格"
prop="salesPrice" >
<el-input v-model="dataForm.salesPrice"
placeholder="数字文本" clearable :style='{"width":"100%"}' >
<el-col :span="12">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" placeholder="数字文本" :step="1">
</el-input>
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="运输方式"
prop="transportType" >
<el-select v-model="dataForm.transportType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="12">
<el-form-item label="运输方式" prop="transportType">
<el-select v-model="dataForm.transportType" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in transportTypeOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="运费"
prop="departmentId" >
<el-input-number v-model="dataForm.departmentId"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="运费" prop="departmentId">
<el-input-number v-model="dataForm.departmentId" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="车号"
prop="licenseNo" >
<relationForm v-model="dataForm.licenseNo"
placeholder="请选择" clearable field="licenseNo" modelId ="294090217084722181" :columnOptions="licenseNocolumnOptions" relationField="selectField122" >
<el-col :span="12">
<el-form-item label="车号" prop="licenseNo">
<popupSelect v-model="dataForm.licenseNo" placeholder="请选择" clearable field="licenseNo"
interfaceId="381432451370615173" :columnOptions="licenseNocolumnOptions" propsValue="id" relationField="ticketno" popupType="dialog"
popupTitle="选择数据" popupWidth="800px">
</relationForm>
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="业务员名称"
prop="businessName" >
<el-input v-model="dataForm.businessName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12">
<el-form-item label="业务员名称" prop="businessName">
<el-input v-model="dataForm.businessName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="磅单图片"
prop="poundPictures" >
<JNPF-UploadImg v-model="dataForm.poundPictures"
:fileSize="500" sizeUnit="MB" :limit="9" >
<el-col :span="24">
<el-form-item label="磅单图片" prop="poundPictures">
<JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="皮重"
prop="tareWeight" >
<el-input-number v-model="dataForm.tareWeight"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="毛重"
prop="grossWeight" >
<el-input-number v-model="dataForm.grossWeight"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="扣重"
prop="buckleWeight" >
<el-input-number v-model="dataForm.buckleWeight"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="净重"
prop="netWeight" >
<el-input-number v-model="dataForm.netWeight"
placeholder="数字文本" :step="1" >
<el-col :span="12">
<el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" placeholder="数字文本" :step="1">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="备注"
prop="remark" >
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="司机名称"
prop="driverName" >
<el-input v-model="dataForm.driverName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="司机名称" prop="driverName">
<el-input v-model="dataForm.driverName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="车辆图片"
prop="vehiclePictures" >
<JNPF-UploadImg v-model="dataForm.vehiclePictures"
:fileSize="500" sizeUnit="MB" :limit="9" >
<el-col :span="24">
<el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="制单人"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="制单人" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -200,8 +175,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -211,49 +190,42 @@
loading: false,
isDetail: false,
dataForm: {
materialCode : "",
materialName : '',
salesName : "",
customerName : '',
advance : "",
salesPrice : '',
transportType : "",
departmentId : 11.225,
licenseNo : "",
businessName : '',
poundPictures : [],
tareWeight : '',
grossWeight : '',
buckleWeight : '',
netWeight : '',
remark : '',
driverName : '',
vehiclePictures : [],
creatorusername : '',
materialCode: "",
materialName: '',
salesName: "",
customerName: '',
advance: "",
salesPrice: '',
transportType: "",
departmentId: 11.225,
licenseNo: "",
businessName: '',
poundPictures: [],
tareWeight: '',
grossWeight: '',
buckleWeight: '',
netWeight: '',
remark: '',
driverName: '',
vehiclePictures: [],
creatorusername: '',
},
rules:
{
materialCode: [
{
rules: {
materialCode: [{
required: true,
message: '请选择',
trigger: 'change'
},
],
salesName: [
{
}, ],
salesName: [{
required: true,
message: '请选择',
trigger: 'change'
},
],
licenseNo: [
{
}, ],
licenseNo: [{
required: true,
message: '请选择',
trigger: 'change'
},
],
}, ],
// poundPictures: [
// {
// required: true,
@ -261,50 +233,98 @@
// trigger: 'click'
// },
// ],
tareWeight: [
{
tareWeight: [{
required: true,
message: '数字文本',
trigger: ["blur","change"]
},
],
grossWeight: [
{
trigger: ["blur", "change"]
}, ],
grossWeight: [{
required: true,
message: '数字文本',
trigger: ["blur","change"]
},
],
buckleWeight: [
{
trigger: ["blur", "change"]
}, ],
buckleWeight: [{
required: true,
message: '数字文本',
trigger: ["blur","change"]
},
],
netWeight: [
{
trigger: ["blur", "change"]
}, ],
netWeight: [{
required: true,
message: '数字文本',
trigger: ["blur","change"]
trigger: ["blur", "change"]
}, ],
},
materialCodecolumnOptions:[ {"label":"物料编码","value":"item_code"},
{"label":"物料名称","value":"description"},
{"label":"库存组织","value":"organization_id"},
{"label":"默认库区","value":"areaname"},],
salesNamecolumnOptions: [{
"label": "合同编码",
"value": "contract_code"
},
{
"label": "合同名称",
"value": "contract_name"
},
{
"label": "合同类型",
"value": "contract_type"
},
{
"label": "供应商/客户名称",
"value": "name"
},],
advanceOptions: [{
"fullName": "是",
"id": "1"
}, {
"fullName": "否",
"id": "0"
}],
transportTypeOptions: [{
"fullName": "汽运",
"id": "0"
}, {
"fullName": "船运",
"id": "1"
}, {
"fullName": "火车",
"id": "2"
}],
licenseNocolumnOptions: [{
"label": "车牌号",
"value": "ticketno"
},
{
"label": "司机",
"value": "drivername"
},
{
"label": "车辆照片",
"value": "vehiclephotos"
},
{
"label": "手机号",
"value": "contact"
},
],
{
"label": "创建人",
"value": "f_creatorusername"
},
materialCodecolumnOptions:[ {"label":"物料编码","value":"item_code"}, {"label":"物料名称","value":"description"}, {"label":"库存组织","value":"organization_id"}, {"label":"默认库区","value":"areaname"},],
salesNamecolumnOptions:[ {"label":"事件等级","value":"selectField121"},],
advanceOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"0"}],
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
licenseNocolumnOptions:[ {"label":"事件级别","value":"selectField122"},],
{
"label": "创建时间",
"value": "f_creatortime"
},],
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -321,16 +341,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/tradeupload/Tradeupload/'+this.dataForm.id,
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -345,7 +365,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',
@ -362,9 +382,9 @@
}
})
})
}else{
} else {
request({
url: '/api/tradeupload/Tradeupload/'+this.dataForm.id,
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -380,19 +400,18 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.poundPictures = JSON.stringify(_data.poundPictures)
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.poundPictures = JSON.parse( _dataAll.poundPictures)
_dataAll.vehiclePictures = JSON.parse( _dataAll.vehiclePictures)
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.poundPictures = JSON.parse(_dataAll.poundPictures)
_dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures)
this.dataForm = _dataAll
},
},
}
</script>

@ -22,95 +22,117 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="licenseNo" label="车号" width="0" align="left"
/>
<el-table-column prop="materialName" label="物料名称" width="0" align="left"
/>
<el-table-column prop="grossWeight" label="毛重" width="0" align="left"
/>
<el-table-column prop="tareWeight" label="皮重" width="0" align="left"
/>
<el-table-column prop="buckleWeight" label="扣重" width="0" align="left"
/>
<el-table-column prop="netWeight" label="净重" width="0" align="left"
/>
<el-table-column prop="driverName" label="司机名称" width="0" align="left"
/>
<el-table-column prop="customerName" label="客户名称" width="0" align="left"
/>
<el-table-column prop="salesName" label="销售合同" width="0" align="left"
/>
<el-table-column label="是否垫资" width="0" prop="advance" algin="left"
>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="licenseNo" label="车号" width="0" align="left" />
<el-table-column prop="materialName" label="物料名称" width="0" align="left" />
<el-table-column prop="grossWeight" label="毛重" width="0" align="left" />
<el-table-column prop="tareWeight" label="皮重" width="0" align="left" />
<el-table-column prop="buckleWeight" label="扣重" width="0" align="left" />
<el-table-column prop="netWeight" label="净重" width="0" align="left" />
<el-table-column prop="driverName" label="司机名称" width="0" align="left" />
<el-table-column prop="customerName" label="客户名称" width="0" align="left" />
<el-table-column prop="salesName" label="销售合同" width="0" align="left" />
<el-table-column label="是否垫资" width="0" prop="advance" algin="left">
<template slot-scope="scope">
{{ scope.row.advance | dynamicText(advanceOptions) }}
</template>
</el-table-column>
<el-table-column label="运输方式" width="0" prop="transportType" algin="left"
>
<el-table-column label="运输方式" width="0" prop="transportType" algin="left">
<template slot-scope="scope">
{{ scope.row.transportType | dynamicText(transportTypeOptions) }}
</template>
</el-table-column>
<el-table-column prop="departmentId" label="运费" width="0" align="left"
/>
<el-table-column prop="salesPrice" label="销售价格" width="0" align="left"
/>
<el-table-column prop="creatorusername" label="制单人" width="0" align="left"
/>
<el-table-column prop="businessName" label="业务员名称" width="0" align="left"
/>
<el-table-column prop="remark" label="备注" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="100" >
<el-table-column prop="departmentId" label="运费" width="0" align="left" />
<el-table-column prop="salesPrice" label="销售价格" width="0" align="left" />
<el-table-column prop="creatorusername" label="制单人" width="0" align="left" />
<el-table-column prop="businessName" label="业务员" width="0" align="left" />
<el-table-column prop="remark" label="备注" width="0" align="left" />
<el-table-column prop="poundPictures" label="磅单图片" width="0" align="left">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<img :src="`/dev${item.url}`" width="100%" />
<img
slot="reference"
:src="`/dev${item.url}`"
:alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
</el-popover>
</span>
</template>
</el-table-column>
<el-table-column prop="vehiclePictures" label="车辆图片" width="0" align="left">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<img :src="`/dev${item.url}`" width="100%" />
<img
slot="reference"
:src="`/dev${item.url}`"
:alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
</el-popover>
</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
materialName:undefined,
materialName: undefined,
},
treeProps: {
children: 'children',
@ -119,7 +141,8 @@
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -128,28 +151,96 @@
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'licenseNo', label: '车号'},
{prop: 'materialName', label: '物料名称'},
{prop: 'grossWeight', label: '毛重'},
{prop: 'tareWeight', label: '皮重'},
{prop: 'buckleWeight', label: '扣重'},
{prop: 'netWeight', label: '净重'},
{prop: 'driverName', label: '司机名称'},
{prop: 'customerName', label: '客户名称'},
{prop: 'salesName', label: '销售合同'},
{prop: 'advance', label: '是否垫资'},
{prop: 'transportType', label: '运输方式'},
{prop: 'departmentId', label: '运费'},
{prop: 'salesPrice', label: '销售价格'},
{prop: 'creatorusername', label: '制单人'},
{prop: 'businessName', label: '业务员名称'},
{prop: 'remark', label: '备注'},
columnList: [{
prop: 'licenseNo',
label: '车号'
},
{
prop: 'materialName',
label: '物料名称'
},
{
prop: 'grossWeight',
label: '毛重'
},
{
prop: 'tareWeight',
label: '皮重'
},
{
prop: 'buckleWeight',
label: '扣重'
},
{
prop: 'netWeight',
label: '净重'
},
{
prop: 'driverName',
label: '司机名称'
},
{
prop: 'customerName',
label: '客户名称'
},
{
prop: 'salesName',
label: '销售合同'
},
{
prop: 'advance',
label: '是否垫资'
},
{
prop: 'transportType',
label: '运输方式'
},
{
prop: 'departmentId',
label: '运费'
},
{
prop: 'salesPrice',
label: '销售价格'
},
{
prop: 'creatorusername',
label: '制单人'
},
{
prop: 'businessName',
label: '业务员名称'
},
{
prop: 'remark',
label: '备注'
},
],
advanceOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"0"}],
advanceProps:{"label":"fullName","value":"id"},
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
transportTypeProps:{"label":"fullName","value":"id"},
advanceOptions: [{
"fullName": "是",
"id": "1"
}, {
"fullName": "否",
"id": "0"
}],
advanceProps: {
"label": "fullName",
"value": "id"
},
transportTypeOptions: [{
"fullName": "汽运",
"id": "0"
}, {
"fullName": "船运",
"id": "1"
}, {
"fullName": "火车",
"id": "2"
}],
transportTypeProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
@ -161,13 +252,17 @@
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -177,15 +272,15 @@
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/tradeupload/Tradeupload/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -211,8 +306,7 @@
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -243,8 +337,7 @@
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -259,7 +352,12 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/tradeupload/Tradeupload/Actions/Export`,
method: 'GET',

@ -1,50 +1,45 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="600px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="24" >
<!-- <el-col :span="24">
<el-form-item label-width="0">
<JNPF-Text :style='{"width":"100%"}'
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}' value="车辆信息">
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}'
value="车辆信息">
</JNPF-Text>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="车牌号"
prop="ticketno" >
<el-input v-model="dataForm.ticketno"
placeholder="请输入车牌号" clearable :style='{"width":"100%"}'>
</el-col> -->
<el-col :span="24">
<el-form-item label="车牌号" prop="ticketno">
<el-input v-model="dataForm.ticketno" placeholder="请输入车牌号" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="司机名称"
prop="drivername" >
<el-input v-model="dataForm.drivername"
placeholder="请输入司机名称" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="司机名称" prop="drivername">
<el-input v-model="dataForm.drivername" placeholder="请输入司机名称" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="手机号"
prop="contact" >
<el-input v-model="dataForm.contact"
placeholder="请输入手机号" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="手机号" prop="contact">
<el-input v-model="dataForm.contact" placeholder="请输入手机号" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="车辆照片"
prop="vehiclephotos" >
<JNPF-UploadImg v-model="dataForm.vehiclephotos"
:fileSize="5" sizeUnit="MB" :limit="9" >
<el-col :span="24">
<el-form-item label="车辆照片" prop="vehiclephotos">
<JNPF-UploadImg v-model="dataForm.vehiclephotos" :fileSize="5" sizeUnit="MB" :limit="9">
</JNPF-UploadImg>
</el-form-item>
@ -68,7 +63,7 @@
</el-form-item>
</el-col> -->
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -78,8 +73,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -89,40 +88,42 @@
loading: false,
isDetail: false,
dataForm: {
ticketno : '',
drivername : '',
contact : '',
vehiclephotos : [{"name":"006-1 (3).jpg","url":"/api/file/Image/annex/20230105_380637081082287813.jpg","fileId":"20230105_380637081082287813.jpg"},{"name":"微信图片_20220617141029.jpg","url":"/api/file/Image/annex/20230105_380637561959241413.jpg","fileId":"20230105_380637561959241413.jpg"}],
creatorusername : '',
creatortime : "",
ticketno: '',
drivername: '',
contact: '',
vehiclephotos: [{
"name": "006-1 (3).jpg",
"url": "/api/file/Image/annex/20230105_380637081082287813.jpg",
"fileId": "20230105_380637081082287813.jpg"
}, {
"name": "微信图片_20220617141029.jpg",
"url": "/api/file/Image/annex/20230105_380637561959241413.jpg",
"fileId": "20230105_380637561959241413.jpg"
}],
creatorusername: '',
creatortime: "",
},
rules:
{
ticketno: [
{
rules: {
ticketno: [{
required: true,
message: '请输入车牌号',
trigger: 'blur'
},
],
drivername: [
{
}, ],
drivername: [{
required: true,
message: '请输入司机名称',
trigger: 'blur'
},
],
}, ],
},
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -139,16 +140,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/example/Vehicle/'+this.dataForm.id,
url: '/api/example/Vehicle/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -163,7 +164,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/example/Vehicle',
@ -180,9 +181,9 @@
}
})
})
}else{
} else {
request({
url: '/api/example/Vehicle/'+this.dataForm.id,
url: '/api/example/Vehicle/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -198,17 +199,16 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.vehiclephotos = JSON.stringify(_data.vehiclephotos)
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.vehiclephotos = JSON.parse( _dataAll.vehiclephotos)
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.vehiclephotos = JSON.parse(_dataAll.vehiclephotos)
this.dataForm = _dataAll
},
},
}
</script>

@ -47,10 +47,9 @@
<el-table-column prop="drivername" label="司机名称" width="0" align="left" />
<el-table-column prop="contact" label="手机号" width="0" align="left" />
<el-table-column prop="vehiclephotos" label="车辆照片" width="0" align="left">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclephotos)" :key="index">
<el-popover placement="left" trigger="click" width="300">
<el-popover placement="bottom" trigger="click" width="1000">
<img :src="`/dev${item.url}`" width="100%" />
<img
slot="reference"
@ -61,7 +60,6 @@
</el-popover>
</span>
</template>
</el-table-column>
<el-table-column prop="creatorusername" label="录入人" width="0" align="left" />
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" />

@ -1,136 +1,126 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="150px"
label-position="right">
<template v-if="!loading">
<el-col :span="24" >
<el-form-item label="仓库编码"
prop="code" >
<el-input v-model="dataForm.code"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="仓库编码" prop="code">
<el-input v-model="dataForm.code" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="公司代码"
prop="companyCode" >
<el-input v-model="dataForm.companyCode"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="公司代码" prop="companyCode">
<el-input v-model="dataForm.companyCode" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="公司名称"
prop="companyName" >
<el-input v-model="dataForm.companyName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="公司名称" prop="companyName">
<el-input v-model="dataForm.companyName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="仓库位置"
prop="location" >
<el-input v-model="dataForm.location"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="仓库位置" prop="location">
<el-input v-model="dataForm.location" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="仓库类型"
prop="type" >
<el-select v-model="dataForm.type"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="24">
<el-form-item label="仓库类型" prop="type">
<el-select v-model="dataForm.type" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="ERP库存组织"
prop="organization" >
<el-select v-model="dataForm.organization"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in organizationOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="24">
<el-form-item label="ERP库存组织" prop="organization">
<el-select v-model="dataForm.organization" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in organizationOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="ERP子库"
prop="sublibrary" >
<el-select v-model="dataForm.sublibrary"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in sublibraryOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="24">
<el-form-item label="ERP子库" prop="sublibrary">
<el-select v-model="dataForm.sublibrary" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in sublibraryOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="激活状态 "
prop="activestate" >
<el-radio-group v-model="dataForm.activestate"
size="small" >
<el-radio v-for="(item, index) in activestateOptions" :key="index" :label="item.id" :disabled="item.disabled" >
<el-col :span="24">
<el-form-item label="激活状态 " prop="activestate">
<!-- <el-radio-group v-model="dataForm.activestate" size="small">
<el-radio v-for="(item, index) in activestateOptions" :key="index" :label="item.id"
:disabled="item.disabled">
{{item.fullName}}
</el-radio>
</el-radio-group>
</el-radio-group> -->
<el-switch v-model="dataForm.activestate" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="备注"
prop="remark" >
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="创建人名称"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="创建人名称" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="创建时间"
prop="creatortime" >
<el-date-picker v-model="dataForm.creatortime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="24">
<el-form-item label="创建时间" prop="creatortime">
<el-date-picker v-model="dataForm.creatortime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="修改人名称"
prop="lastmodifyusername" >
<el-input v-model="dataForm.lastmodifyusername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="24">
<el-form-item label="修改人名称" prop="lastmodifyusername">
<el-input v-model="dataForm.lastmodifyusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="修改时间"
prop="lastmodifytime" >
<el-date-picker v-model="dataForm.lastmodifytime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<el-col :span="24">
<el-form-item label="修改时间" prop="lastmodifytime">
<el-date-picker v-model="dataForm.lastmodifytime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
@ -140,8 +130,12 @@
</template>
<script>
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -151,65 +145,109 @@
loading: false,
isDetail: false,
dataForm: {
code : '',
companyCode : '',
companyName : '',
location : '',
type : "",
organization : "",
sublibrary : "",
activestate : "2",
remark : '',
creatorusername : '',
creatortime : '',
lastmodifyusername : '',
lastmodifytime : '',
code: '',
companyCode: '',
companyName: '',
location: '',
type: "",
organization: "",
sublibrary: "",
activestate: "1",
remark: '',
creatorusername: '',
creatortime: '',
lastmodifyusername: '',
lastmodifytime: '',
},
rules:
{
code: [
{
rules: {
code: [{
required: true,
message: '请输入',
trigger: 'blur'
},
],
type: [
{
}, ],
type: [{
required: true,
message: '请输入',
trigger: 'blur'
},
],
organization: [
{
}, ],
organization: [{
required: true,
message: '请输入',
trigger: 'blur'
},
],
sublibrary: [
{
}, ],
sublibrary: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
},
],
},
typeOptions:[{"fullName":"原料库","id":"0"},{"fullName":"中间库","id":"1"},{"fullName":"成品库","id":"2"},{"fullName":"副产品库","id":"3"},{"fullName":"废次品库","id":"4"},{"fullName":"备件辅材库","id":"5"},{"fullName":"贸易虚拟库","id":"6"},{"fullName":"仓储库","id":"7"},{"fullName":"能源库","id":"8"},{"fullName":"其他库","id":"9"},{"fullName":"帐外库","id":"10"}],
organizationOptions:[{"fullName":"济钢集团","id":"0"},{"fullName":"日照","id":"1"}],
sublibraryOptions:[{"fullName":"城市矿产钢材库","id":"0"},{"fullName":"黄河爆破待发库","id":"1"},{"fullName":"黄河爆破完工库","id":"2"}],
activestateOptions:[{"fullName":"激活","id":"1"},{"fullName":"未激活","id":"0"}],
typeOptions: [{
"fullName": "原料库",
"id": "0"
}, {
"fullName": "中间库",
"id": "1"
}, {
"fullName": "成品库",
"id": "2"
}, {
"fullName": "副产品库",
"id": "3"
}, {
"fullName": "废次品库",
"id": "4"
}, {
"fullName": "备件辅材库",
"id": "5"
}, {
"fullName": "贸易虚拟库",
"id": "6"
}, {
"fullName": "仓储库",
"id": "7"
}, {
"fullName": "能源库",
"id": "8"
}, {
"fullName": "其他库",
"id": "9"
}, {
"fullName": "帐外库",
"id": "10"
}],
organizationOptions: [{
"fullName": "济钢集团",
"id": "0"
}, {
"fullName": "日照",
"id": "1"
}],
sublibraryOptions: [{
"fullName": "城市矿产钢材库",
"id": "0"
}, {
"fullName": "黄河爆破待发库",
"id": "1"
}, {
"fullName": "黄河爆破完工库",
"id": "2"
}],
/* activestateOptions: [{
"fullName": "激活",
"id": "1"
}, {
"fullName": "未激活",
"id": "0"
}], */
}
},
computed: {},
watch: {},
created() {
},
created() {},
mounted() {},
methods: {
clearData(data){
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
@ -226,16 +264,16 @@
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/warehouse/Warehouse/'+this.dataForm.id,
url: '/api/warehouse/Warehouse/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData(this.dataForm)
}
});
@ -250,7 +288,7 @@
})
},
request() {
var _data =this.dataList()
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/warehouse/Warehouse',
@ -267,9 +305,9 @@
}
})
})
}else{
} else {
request({
url: '/api/warehouse/Warehouse/'+this.dataForm.id,
url: '/api/warehouse/Warehouse/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -285,15 +323,14 @@
})
}
},
dataList(){
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
},
},
}
</script>

@ -6,11 +6,9 @@
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="激活状态 ">
<el-select v-model="query.activestate" placeholder="请选择"
clearable>
<el-select v-model="query.activestate" placeholder="请选择" clearable>
<el-option v-for="(item, index) in activestateOptions" :key="index"
:label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -32,98 +30,93 @@
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
@click="reset()" />
</el-tooltip>
<screenfull isContainer/>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="code" label="仓库编码" width="0" align="left"
/>
<el-table-column label="激活状态 " width="0" prop="activestate" algin="left"
>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="code" label="仓库编码" width="0" align="left" />
<el-table-column label="激活状态 " width="0" prop="activestate" algin="left">
<template slot-scope="scope">
{{ scope.row.activestate | dynamicText(activestateOptions) }}
</template>
</el-table-column>
<el-table-column prop="companyCode" label="公司代码" width="0" align="left"
/>
<el-table-column prop="companyName" label="公司名称" width="0" align="left"
/>
<el-table-column label="仓库类型" width="0" prop="type" algin="left"
>
<el-table-column prop="companyCode" label="公司代码" width="0" align="left" />
<el-table-column prop="companyName" label="公司名称" width="0" align="left" />
<el-table-column label="仓库类型" width="0" prop="type" algin="left">
<template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }}
</template>
</el-table-column>
<el-table-column label="ERP库存组织" width="0" prop="organization" algin="left"
>
<el-table-column label="ERP库存组织" width="0" prop="organization" algin="left">
<template slot-scope="scope">
{{ scope.row.organization | dynamicText(organizationOptions) }}
</template>
</el-table-column>
<el-table-column label="ERP子库" width="0" prop="sublibrary" algin="left"
>
<el-table-column label="ERP子库" width="0" prop="sublibrary" algin="left">
<template slot-scope="scope">
{{ scope.row.sublibrary | dynamicText(sublibraryOptions) }}
</template>
</el-table-column>
<el-table-column prop="location" label="仓库位置" width="0" align="left"
/>
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left"
/>
<el-table-column prop="creatortime" label="创建时间" width="0" align="left"
/>
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left"
/>
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left"
/>
<el-table-column prop="remark" label="备注" width="0" align="left"
/>
<el-table-column label="操作" fixed="right"
width="100" >
<el-table-column prop="location" label="仓库位置" width="0" align="left" />
<el-table-column prop="creatorusername" label="创建人名称" width="0" align="left" />
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" />
<el-table-column prop="lastmodifyusername" label="修改人名称" width="0" align="left" />
<el-table-column prop="lastmodifytime" label="修改时间" width="0" align="left" />
<el-table-column prop="remark" label="备注" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
activestate:undefined,
code:undefined,
activestate: undefined,
code: undefined,
},
treeProps: {
children: 'children',
@ -132,7 +125,8 @@
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -141,29 +135,133 @@
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'code', label: '仓库编码'},
{prop: 'activestate', label: '激活状态 '},
{prop: 'companyCode', label: '公司代码'},
{prop: 'companyName', label: '公司名称'},
{prop: 'type', label: '仓库类型'},
{prop: 'organization', label: 'ERP库存组织'},
{prop: 'sublibrary', label: 'ERP子库'},
{prop: 'location', label: '仓库位置'},
{prop: 'creatorusername', label: '创建人名称'},
{prop: 'creatortime', label: '创建时间'},
{prop: 'lastmodifyusername', label: '修改人名称'},
{prop: 'lastmodifytime', label: '修改时间'},
{prop: 'remark', label: '备注'},
columnList: [{
prop: 'code',
label: '仓库编码'
},
{
prop: 'activestate',
label: '激活状态 '
},
{
prop: 'companyCode',
label: '公司代码'
},
{
prop: 'companyName',
label: '公司名称'
},
{
prop: 'type',
label: '仓库类型'
},
{
prop: 'organization',
label: 'ERP库存组织'
},
{
prop: 'sublibrary',
label: 'ERP子库'
},
{
prop: 'location',
label: '仓库位置'
},
{
prop: 'creatorusername',
label: '创建人名称'
},
{
prop: 'creatortime',
label: '创建时间'
},
{
prop: 'lastmodifyusername',
label: '修改人名称'
},
{
prop: 'lastmodifytime',
label: '修改时间'
},
{
prop: 'remark',
label: '备注'
},
],
typeOptions:[{"fullName":"原料库","id":"0"},{"fullName":"中间库","id":"1"},{"fullName":"成品库","id":"2"},{"fullName":"副产品库","id":"3"},{"fullName":"废次品库","id":"4"},{"fullName":"备件辅材库","id":"5"},{"fullName":"贸易虚拟库","id":"6"},{"fullName":"仓储库","id":"7"},{"fullName":"能源库","id":"8"},{"fullName":"其他库","id":"9"},{"fullName":"帐外库","id":"10"}],
typeProps:{"label":"fullName","value":"id"},
organizationOptions:[{"fullName":"济钢集团","id":"0"},{"fullName":"日照","id":"1"}],
organizationProps:{"label":"fullName","value":"id"},
sublibraryOptions:[{"fullName":"城市矿产钢材库","id":"0"},{"fullName":"黄河爆破待发库","id":"1"},{"fullName":"黄河爆破完工库","id":"2"}],
sublibraryProps:{"label":"fullName","value":"id"},
activestateOptions:[{"fullName":"激活","id":"1"},{"fullName":"未激活","id":"0"}],
activestateProps:{"label":"fullName","value":"id"},
typeOptions: [{
"fullName": "原料库",
"id": "0"
}, {
"fullName": "中间库",
"id": "1"
}, {
"fullName": "成品库",
"id": "2"
}, {
"fullName": "副产品库",
"id": "3"
}, {
"fullName": "废次品库",
"id": "4"
}, {
"fullName": "备件辅材库",
"id": "5"
}, {
"fullName": "贸易虚拟库",
"id": "6"
}, {
"fullName": "仓储库",
"id": "7"
}, {
"fullName": "能源库",
"id": "8"
}, {
"fullName": "其他库",
"id": "9"
}, {
"fullName": "帐外库",
"id": "10"
}],
typeProps: {
"label": "fullName",
"value": "id"
},
organizationOptions: [{
"fullName": "济钢集团",
"id": "0"
}, {
"fullName": "日照",
"id": "1"
}],
organizationProps: {
"label": "fullName",
"value": "id"
},
sublibraryOptions: [{
"fullName": "城市矿产钢材库",
"id": "0"
}, {
"fullName": "黄河爆破待发库",
"id": "1"
}, {
"fullName": "黄河爆破完工库",
"id": "2"
}],
sublibraryProps: {
"label": "fullName",
"value": "id"
},
activestateOptions: [{
"fullName": "激活",
"id": "1"
}, {
"fullName": "未激活",
"id": "0"
}],
activestateProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
@ -175,13 +273,17 @@
this.initData()
},
methods: {
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -191,15 +293,15 @@
let _query = {
...this.listQuery,
...this.query,
menuId:this.menuId
menuId: this.menuId
};
request({
url: `/api/warehouse/Warehouse/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =[];
for(let i=0;i<res.data.list.length;i++){
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
@ -225,8 +327,7 @@
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -257,8 +358,7 @@
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -273,7 +373,12 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/warehouse/Warehouse/Actions/Export`,
method: 'GET',

Loading…
Cancel
Save