|
|
|
@ -7,18 +7,19 @@ |
|
|
|
<el-form-item label="工厂编号"> |
|
|
|
<el-select v-model="searchData.site" style="width: 100%"> |
|
|
|
<el-option label="全部" value=" "></el-option> |
|
|
|
<el-option :label="site.siteid" :value="site.siteid" v-for="(site) in siteList" :key="site.siteid"></el-option> |
|
|
|
<el-option :label="site.siteid" :value="site.siteid" v-for="(site) in siteList" |
|
|
|
:key="site.siteid"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="货币"> |
|
|
|
<el-input v-model="searchData.currency" clearable ></el-input> |
|
|
|
<el-input v-model="searchData.currency" clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="货币描述"> |
|
|
|
<el-input v-model="searchData.currencyDesc" clearable ></el-input> |
|
|
|
<el-input v-model="searchData.currencyDesc" clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
@ -43,7 +44,7 @@ |
|
|
|
|
|
|
|
<!-- 展示列表 --> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
height="36vh" |
|
|
|
:data="dataList" |
|
|
|
@row-click="changeData" |
|
|
|
border |
|
|
|
@ -61,11 +62,12 @@ |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template v-if="item.columnProp==='active'"> |
|
|
|
<span > {{ scope.row[item.columnProp] === 'Y'? '启用' : '停用' }}</span> |
|
|
|
<span> {{ scope.row[item.columnProp] === 'Y' ? '启用' : '停用' }}</span> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -73,7 +75,7 @@ |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="120" |
|
|
|
min-width="100" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" @click="updateModal(scope.row)">修改</a> |
|
|
|
@ -93,17 +95,17 @@ |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
|
|
|
|
<el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card"> |
|
|
|
<el-tab-pane label="汇率" name="detail" > |
|
|
|
<el-row style="display: flex"> |
|
|
|
<el-card style="width: 50%"> |
|
|
|
<el-col > |
|
|
|
<el-tabs style="height: auto;" class="customer-tab" v-model="activeName" type="border-card"> |
|
|
|
<el-tab-pane label="汇率" name="detail"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-card> |
|
|
|
<div>参考货币</div> |
|
|
|
<el-button v-if="!authSave" type="primary" @click="addModal1()">新增</el-button> |
|
|
|
<el-table |
|
|
|
:data="dataList1" |
|
|
|
@row-click="changeData2" |
|
|
|
:height="height" |
|
|
|
height="36vh" |
|
|
|
border |
|
|
|
:row-style="rowStyle2" |
|
|
|
style="width: 100%; "> |
|
|
|
@ -127,26 +129,25 @@ |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="160" |
|
|
|
width="80" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- <a type="text" size="small" @click="updateModal1(scope.row)">修改</a>--> |
|
|
|
<!-- <a type="text" size="small" @click="updateModal1(scope.row)">修改</a>--> |
|
|
|
<a type="text" size="small" @click="deleteModal1(scope.row)">删除</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
</el-col> |
|
|
|
</el-card> |
|
|
|
<el-card style="width: 50%"> |
|
|
|
<el-col style="margin-left: 20px"> |
|
|
|
<el-col> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-card> |
|
|
|
<div> |
|
|
|
<span>货币汇率</span> |
|
|
|
</el-col> |
|
|
|
</div> |
|
|
|
<el-button v-if="!authSave" type="primary" @click="addModal2()">新增</el-button> |
|
|
|
<el-table |
|
|
|
:data="dataList2" |
|
|
|
:height="height" |
|
|
|
height="36vh" |
|
|
|
border |
|
|
|
style="width: 100%; "> |
|
|
|
<el-table-column |
|
|
|
@ -169,29 +170,30 @@ |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="160" |
|
|
|
width="80" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- <a type="text" size="small" @click="updateModal2(scope.row)">修改</a>--> |
|
|
|
<!-- <a type="text" size="small" @click="updateModal2(scope.row)">修改</a>--> |
|
|
|
<a type="text" size="small" @click="deleteModal2(scope.row)">删除</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-col> |
|
|
|
</el-card> |
|
|
|
</el-row> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 货币新增修改--> |
|
|
|
<!-- 货币新增修改--> |
|
|
|
<el-dialog title="货币" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="450px"> |
|
|
|
<el-form label-position="top" :model="modalData" :rules="rules" > |
|
|
|
<el-form label-position="top" :model="modalData" :rules="rules"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item label="工厂编码" prop="site"> |
|
|
|
<el-select v-model="modalData.site" :disabled="modalDisableFlag" style="width: 100%"> |
|
|
|
<el-option :label="site.siteid" :value="site.siteid" v-for="(site) in siteList" :key="site.siteid"></el-option> |
|
|
|
<el-option :label="site.siteid" :value="site.siteid" v-for="(site) in siteList" |
|
|
|
:key="site.siteid"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -199,17 +201,17 @@ |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item label="货币:" prop="currency"> |
|
|
|
<el-input v-model="modalData.currency" :disabled="modalDisableFlag" ></el-input> |
|
|
|
<el-input v-model="modalData.currency" :disabled="modalDisableFlag"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="14"> |
|
|
|
<el-form-item label="货币描述" prop="currencyDesc"> |
|
|
|
<el-input v-model="modalData.currencyDesc" ></el-input> |
|
|
|
<el-input v-model="modalData.currencyDesc"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item label="状态" prop="active"> |
|
|
|
<el-select v-model="modalData.active" style="width: 100%" placeholder="请选择"> |
|
|
|
<el-select v-model="modalData.active" style="width: 100%" placeholder="请选择"> |
|
|
|
<el-option label="启用" value="Y"></el-option> |
|
|
|
<el-option label="停用" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
@ -231,7 +233,7 @@ |
|
|
|
|
|
|
|
<!-- 货币参考新增和修改 --> |
|
|
|
<el-dialog title="货币参考" :close-on-click-modal="false" v-drag :visible.sync="modalFlag1" width="300px"> |
|
|
|
<el-form label-position="top" :model="modalData1" :rules="rules" > |
|
|
|
<el-form label-position="top" :model="modalData1" :rules="rules"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="参考货币" prop="currency"> |
|
|
|
@ -255,13 +257,15 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 货币汇率新增和修改 --> |
|
|
|
<el-dialog title="货币汇率" top="20vh" :close-on-click-modal="false" v-drag :visible.sync="modalFlag2" width="200px"> |
|
|
|
<el-dialog title="货币汇率" top="20vh" :close-on-click-modal="false" v-drag :visible.sync="modalFlag2" |
|
|
|
width="200px"> |
|
|
|
<el-form label-position="top" :model="modalData2" :rules="rules"> |
|
|
|
<el-form-item label="汇率:" prop="exchangeRate"> |
|
|
|
<el-input-number v-model="modalData2.exchangeRate" style="width: 50%;" :controls="false" :step="0" :precision="4"></el-input-number> |
|
|
|
<el-input-number v-model="modalData2.exchangeRate" style="width: 50%;" :controls="false" :step="0" |
|
|
|
:precision="4"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="启用日期" > |
|
|
|
<el-form-item label="启用日期"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 100%" |
|
|
|
v-model="modalData2.activationDate" |
|
|
|
@ -282,17 +286,17 @@ |
|
|
|
<el-form label-position="top" :model="currency"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="货币" > |
|
|
|
<el-form-item label="货币"> |
|
|
|
<el-input v-model="currency.currency"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="货币描述" > |
|
|
|
<el-form-item label="货币描述"> |
|
|
|
<el-input v-model="currency.currencyDesc"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label=" " > |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button type="primary" @click="queryCurrency">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -357,7 +361,7 @@ import { |
|
|
|
} from '@/api/fanucGroup/currency.js' |
|
|
|
|
|
|
|
export default { |
|
|
|
data () { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
activeName: 'detail', |
|
|
|
currentRow: '', |
|
|
|
@ -443,7 +447,7 @@ export default { |
|
|
|
serialNumber: '501004TableSite', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '工厂编码', |
|
|
|
columnWidth: 100, |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'site', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
@ -461,7 +465,7 @@ export default { |
|
|
|
serialNumber: '501004TableCurrency', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '货币', |
|
|
|
columnWidth: 120, |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'currency', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
@ -479,7 +483,7 @@ export default { |
|
|
|
serialNumber: '501004TableCurrencyDesc', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '货币描述', |
|
|
|
columnWidth: 180, |
|
|
|
columnWidth: 160, |
|
|
|
columnProp: 'currencyDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
@ -497,7 +501,7 @@ export default { |
|
|
|
serialNumber: '501004TableBaseCurrencyFlag', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '本位币', |
|
|
|
columnWidth: 120, |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'baseCurrencyFlag', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
@ -515,7 +519,7 @@ export default { |
|
|
|
serialNumber: '501004TableActive', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '状态', |
|
|
|
columnWidth: 100, |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'active', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
@ -533,7 +537,7 @@ export default { |
|
|
|
serialNumber: '501004TableCreateDate', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '录入时间', |
|
|
|
columnWidth: 160, |
|
|
|
columnWidth: 120, |
|
|
|
columnProp: 'createDate', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
@ -551,7 +555,7 @@ export default { |
|
|
|
serialNumber: '501004TableCreateBy', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '录入人', |
|
|
|
columnWidth: 160, |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'createBy', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
@ -569,7 +573,7 @@ export default { |
|
|
|
serialNumber: '501004TableUpdateDate', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '修改时间', |
|
|
|
columnWidth: 160, |
|
|
|
columnWidth: 120, |
|
|
|
columnProp: 'updateDate', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
@ -587,7 +591,7 @@ export default { |
|
|
|
serialNumber: '501004TableUpdateBy', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '修改人', |
|
|
|
columnWidth: 160, |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'updateBy', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
@ -607,7 +611,7 @@ export default { |
|
|
|
serialNumber: '501004TableCurrency', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '货币', |
|
|
|
columnWidth: 100, |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'currency', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
@ -625,7 +629,7 @@ export default { |
|
|
|
serialNumber: '501004TableCurrencyDesc', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '货币描述', |
|
|
|
columnWidth: 160, |
|
|
|
columnWidth: 140, |
|
|
|
columnProp: 'currencyDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
@ -663,7 +667,7 @@ export default { |
|
|
|
serialNumber: '501004TableExchangeRate', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '汇率', |
|
|
|
columnWidth: 110, |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'exchangeRate', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
@ -699,7 +703,7 @@ export default { |
|
|
|
serialNumber: '501004TableCreateDate', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '录入时间', |
|
|
|
columnWidth: 140, |
|
|
|
columnWidth: 120, |
|
|
|
columnProp: 'createDate', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
@ -717,7 +721,7 @@ export default { |
|
|
|
serialNumber: '501004TableCreateBy', |
|
|
|
tableId: '501004Table', |
|
|
|
tableName: '录入人', |
|
|
|
columnWidth: 110, |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'createBy', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
@ -761,28 +765,27 @@ export default { |
|
|
|
authDelete: false, |
|
|
|
menuId: this.$route.meta.menuId, |
|
|
|
|
|
|
|
siteList:[], |
|
|
|
currencyVisible:false, |
|
|
|
currency:{ |
|
|
|
siteList: [], |
|
|
|
currencyVisible: false, |
|
|
|
currency: { |
|
|
|
site: '', |
|
|
|
currency: '', |
|
|
|
currencyDesc: '', |
|
|
|
}, |
|
|
|
currencyList:[], |
|
|
|
currencyList: [], |
|
|
|
no: 1, |
|
|
|
size: 20, |
|
|
|
total: 0, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
mounted () { |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = (window.innerHeight - 260) / 2 |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//货币自动转化成大写 |
|
|
|
watch: { |
|
|
|
modalData: { |
|
|
|
@ -795,12 +798,12 @@ export default { |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
'modalData1.currency'(newVal,oldVal){ |
|
|
|
'modalData1.currency'(newVal, oldVal) { |
|
|
|
this.modalData1.currency = newVal.toUpperCase(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
created () { |
|
|
|
created() { |
|
|
|
this.handleQuerySite() |
|
|
|
//页面在加载的时候就调用查询方法 |
|
|
|
this.getDataList() |
|
|
|
@ -822,7 +825,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询获取数据列表 |
|
|
|
getDataList () { |
|
|
|
getDataList() { |
|
|
|
this.searchData.limit = this.pageSize |
|
|
|
this.searchData.page = this.pageIndex |
|
|
|
findCurrency(this.searchData).then(({data}) => { |
|
|
|
@ -836,24 +839,25 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 每页数 |
|
|
|
sizeChangeHandle (val) { |
|
|
|
sizeChangeHandle(val) { |
|
|
|
this.pageSize = val |
|
|
|
this.pageIndex = 1 |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
|
|
|
|
// 当前页 |
|
|
|
currentChangeHandle (val) { |
|
|
|
currentChangeHandle(val) { |
|
|
|
this.pageIndex = val |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
//货币参考 |
|
|
|
changeData (row) { |
|
|
|
changeData(row) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
this.headerData = row |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
this.changeData2({}) |
|
|
|
}, |
|
|
|
refreshCurrentTabTable () { |
|
|
|
refreshCurrentTabTable() { |
|
|
|
findRefCurrency(this.currentRow).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code === 0) { |
|
|
|
@ -864,12 +868,12 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
//货币汇率 |
|
|
|
changeData2 (row) { |
|
|
|
changeData2(row) { |
|
|
|
this.currentRow2 = JSON.parse(JSON.stringify(row)) |
|
|
|
this.headerData2 = row |
|
|
|
this.refreshCurrentTabTable2() |
|
|
|
}, |
|
|
|
refreshCurrentTabTable2 () { |
|
|
|
refreshCurrentTabTable2() { |
|
|
|
findExchangeCurrency(this.currentRow2).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
@ -881,7 +885,7 @@ export default { |
|
|
|
}, |
|
|
|
//货币 |
|
|
|
// 新增按钮 |
|
|
|
addModal () { |
|
|
|
addModal() { |
|
|
|
this.handleQuerySite(); |
|
|
|
this.modalData = { |
|
|
|
flag: '1', |
|
|
|
@ -901,7 +905,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 修改按钮 |
|
|
|
updateModal (row) { |
|
|
|
updateModal(row) { |
|
|
|
this.modalData = { |
|
|
|
flag: '2', |
|
|
|
id: row.id, |
|
|
|
@ -918,7 +922,7 @@ export default { |
|
|
|
this.modalDisableFlag = true |
|
|
|
this.modalFlag = true |
|
|
|
}, |
|
|
|
saveData () { |
|
|
|
saveData() { |
|
|
|
if (this.modalData.baseCurrencyFlag) { |
|
|
|
this.modalData.baseCurrencyFlag = 'Y' |
|
|
|
} else { |
|
|
|
@ -962,7 +966,7 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
deleteModal (row) { |
|
|
|
deleteModal(row) { |
|
|
|
this.$confirm(`是否删除此数据?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -990,8 +994,8 @@ export default { |
|
|
|
|
|
|
|
//货币参考 |
|
|
|
// 新增按钮 |
|
|
|
addModal1 () { |
|
|
|
if (!this.currentRow){ |
|
|
|
addModal1() { |
|
|
|
if (!this.currentRow) { |
|
|
|
this.$message.warning('请选择货币记录!') |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1009,7 +1013,7 @@ export default { |
|
|
|
this.modalFlag1 = true |
|
|
|
}, |
|
|
|
// 修改按钮 |
|
|
|
updateModal1 (row) { |
|
|
|
updateModal1(row) { |
|
|
|
this.modalData1 = { |
|
|
|
flag1: '2', |
|
|
|
id: row.id, |
|
|
|
@ -1023,7 +1027,7 @@ export default { |
|
|
|
this.modalFlag1 = true |
|
|
|
}, |
|
|
|
// 删除方法 |
|
|
|
deleteModal1 (row) { |
|
|
|
deleteModal1(row) { |
|
|
|
this.$confirm(`是否删除此数据?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -1031,7 +1035,7 @@ export default { |
|
|
|
}).then(() => { |
|
|
|
deleteRefCurrency(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.refreshCurrentTabTable () |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
@ -1049,7 +1053,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 新增/修改方法 |
|
|
|
saveData1 () { |
|
|
|
saveData1() { |
|
|
|
if (this.modalData1.flag1 === '1') { // 新增 |
|
|
|
if (this.modalData1.currencyId == null || this.modalData1.currencyId === '') { |
|
|
|
this.$message.warning('请选择一条货币数据!') |
|
|
|
@ -1058,7 +1062,7 @@ export default { |
|
|
|
addRefCurrency(this.modalData1).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.refreshCurrentTabTable () |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
this.modalFlag1 = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
@ -1077,7 +1081,7 @@ export default { |
|
|
|
updateRefCurrency(this.modalData1).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.refreshCurrentTabTable () |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
this.modalFlag1 = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
@ -1097,8 +1101,8 @@ export default { |
|
|
|
|
|
|
|
//货币汇率 |
|
|
|
// 新增按钮 |
|
|
|
addModal2 () { |
|
|
|
if (!this.currentRow2){ |
|
|
|
addModal2() { |
|
|
|
if (!this.currentRow2) { |
|
|
|
this.$message.warning('请选择参考货币记录!') |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1119,7 +1123,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 修改按钮 |
|
|
|
updateModal2 (row) { |
|
|
|
updateModal2(row) { |
|
|
|
this.modalData2 = { |
|
|
|
flag: '2', |
|
|
|
id: row.id, |
|
|
|
@ -1130,9 +1134,9 @@ export default { |
|
|
|
this.modalDisableFlag2 = true |
|
|
|
this.modalFlag2 = true |
|
|
|
}, |
|
|
|
saveData2 () { |
|
|
|
saveData2() { |
|
|
|
if (this.modalData2.flag === '1') { // 新增 |
|
|
|
if (this.modalData2.currency==null || this.modalData2.currency==='') { |
|
|
|
if (this.modalData2.currency == null || this.modalData2.currency === '') { |
|
|
|
this.$message.warning('请选择一条货币参考数据!') |
|
|
|
return |
|
|
|
} |
|
|
|
@ -1177,7 +1181,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
deleteModal2 (row) { |
|
|
|
deleteModal2(row) { |
|
|
|
this.$confirm(`是否删除此数据?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -1204,7 +1208,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询检验类型 |
|
|
|
inspectionTypeSearch () { |
|
|
|
inspectionTypeSearch() { |
|
|
|
let tempData = { |
|
|
|
site: this.$store.state.user.site |
|
|
|
} |
|
|
|
@ -1216,7 +1220,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 校验用户是否收藏 |
|
|
|
favoriteIsOk () { |
|
|
|
favoriteIsOk() { |
|
|
|
let userFavorite = { |
|
|
|
userId: this.$store.state.user.id, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
@ -1231,7 +1235,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 收藏 OR 取消收藏 |
|
|
|
favoriteFunction () { |
|
|
|
favoriteFunction() { |
|
|
|
let userFavorite = { |
|
|
|
userId: this.$store.state.user.id, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
@ -1251,7 +1255,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//导出excel |
|
|
|
async createExportData () { |
|
|
|
async createExportData() { |
|
|
|
this.searchData.limit = -1 |
|
|
|
this.searchData.page = 1 |
|
|
|
await findAll1(this.searchData).then(({data}) => { |
|
|
|
@ -1260,13 +1264,13 @@ export default { |
|
|
|
return this.exportList |
|
|
|
}, |
|
|
|
|
|
|
|
startDownload () { |
|
|
|
startDownload() { |
|
|
|
}, |
|
|
|
|
|
|
|
finishDownload () { |
|
|
|
finishDownload() { |
|
|
|
}, |
|
|
|
|
|
|
|
fields () { |
|
|
|
fields() { |
|
|
|
let json = '{' |
|
|
|
this.columnList.forEach((item, index) => { |
|
|
|
if (index == this.columnList.length - 1) { |
|
|
|
@ -1281,7 +1285,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 动态列开始 获取 用户保存的 格式列 |
|
|
|
async getTableUserColumn (tableId, columnId) { |
|
|
|
async getTableUserColumn(tableId, columnId) { |
|
|
|
let queryTableUser = { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
@ -1313,7 +1317,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取 tableDefault 列 |
|
|
|
async getColumnList (tableId, columnId) { |
|
|
|
async getColumnList(tableId, columnId) { |
|
|
|
let queryTable = { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: tableId, |
|
|
|
@ -1342,7 +1346,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//获取按钮的权限数据 |
|
|
|
getButtonAuthData () { |
|
|
|
getButtonAuthData() { |
|
|
|
let searchFlag = this.isAuth(this.menuId + ':search') |
|
|
|
let saveFlag = this.isAuth(this.menuId + ':save') |
|
|
|
let updateFlag = this.isAuth(this.menuId + ':update') |
|
|
|
@ -1353,31 +1357,31 @@ export default { |
|
|
|
this.authUpdate = !updateFlag |
|
|
|
this.authDelete = !deleteFlag |
|
|
|
}, |
|
|
|
handleQuerySite(){ |
|
|
|
handleQuerySite() { |
|
|
|
let params = { |
|
|
|
username: this.$store.state.user.name, |
|
|
|
} |
|
|
|
queryUserSite(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
queryUserSite(params).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.siteList = data.row2 |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
}).catch((error) => { |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
rowStyle({row}){ |
|
|
|
rowStyle({row}) { |
|
|
|
if (this.currentRow.site === row.site && this.currentRow.currency === row.currency) { |
|
|
|
return { 'background-color': '#E8F7F6', cursor: 'pointer' }; |
|
|
|
return {'background-color': '#E8F7F6', cursor: 'pointer'}; |
|
|
|
} |
|
|
|
}, |
|
|
|
rowStyle2({row}){ |
|
|
|
rowStyle2({row}) { |
|
|
|
if (this.currentRow2.id === row.id) { |
|
|
|
return { 'background-color': '#E8F7F6', cursor: 'pointer' }; |
|
|
|
return {'background-color': '#E8F7F6', cursor: 'pointer'}; |
|
|
|
} |
|
|
|
}, |
|
|
|
handleBlurCurrency(){ |
|
|
|
handleBlurCurrency() { |
|
|
|
let params = { |
|
|
|
site: this.modalData1.site, |
|
|
|
currency: this.modalData1.currency, |
|
|
|
@ -1385,52 +1389,52 @@ export default { |
|
|
|
limit: this.searchData.limit, |
|
|
|
} |
|
|
|
findCurrency(params).then(({data}) => { |
|
|
|
if ( data && data.code === 0) { |
|
|
|
if (data.page.list.length === 1){ |
|
|
|
if (data && data.code === 0) { |
|
|
|
if (data.page.list.length === 1) { |
|
|
|
this.modalData1.currency = this.dataList[0].currency |
|
|
|
this.modalData1.currencyDesc = this.dataList[0].currencyDesc |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.modalData1.currencyDesc = '' |
|
|
|
} |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
}).catch((error) => { |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleClickCurrency(){ |
|
|
|
handleClickCurrency() { |
|
|
|
this.currency.site = this.modalData1.site |
|
|
|
this.currency.currency = this.modalData1.currency |
|
|
|
this.queryCurrency(); |
|
|
|
this.currencyVisible = true |
|
|
|
}, |
|
|
|
queryCurrency(){ |
|
|
|
queryCurrency() { |
|
|
|
let params = { |
|
|
|
...this.currency, |
|
|
|
page: this.no, |
|
|
|
limit: this.size, |
|
|
|
} |
|
|
|
findCurrency(params).then(({data}) => { |
|
|
|
if ( data && data.code === 0) { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.currencyList = data.page.list |
|
|
|
this.total = data.page.totalCount |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
}).catch((error) => { |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleSizeChange(val){ |
|
|
|
handleSizeChange(val) { |
|
|
|
this.size = val |
|
|
|
this.queryCurrency() |
|
|
|
}, |
|
|
|
handleCurrentChange(val){ |
|
|
|
handleCurrentChange(val) { |
|
|
|
this.no = val |
|
|
|
this.queryCurrency() |
|
|
|
}, |
|
|
|
handleDblclick(row){ |
|
|
|
handleDblclick(row) { |
|
|
|
this.modalData1.currency = row.currency |
|
|
|
this.modalData1.currencyDesc = row.currencyDesc |
|
|
|
this.currencyVisible = false |
|
|
|
@ -1440,15 +1444,17 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
.numInput /deep/ .el-input__inner{ |
|
|
|
.numInput /deep/ .el-input__inner { |
|
|
|
text-align: right; |
|
|
|
} |
|
|
|
/deep/ .inlineNumber input::-webkit-outer-spin-button, |
|
|
|
/deep/ .inlineNumber input::-webkit-inner-spin-button { |
|
|
|
|
|
|
|
/deep/ .inlineNumber input::-webkit-outer-spin-button, |
|
|
|
/deep/ .inlineNumber input::-webkit-inner-spin-button { |
|
|
|
-webkit-appearance: none; |
|
|
|
|
|
|
|
} |
|
|
|
/deep/ .inlineNumber input[type="number"]{ |
|
|
|
|
|
|
|
/deep/ .inlineNumber input[type="number"] { |
|
|
|
-moz-appearance: textfield; |
|
|
|
padding-right: 5px !important; |
|
|
|
} |
|
|
|
|