You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
923 lines
33 KiB
923 lines
33 KiB
<template>
|
|
<div class="mod-config">
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
|
|
<el-form-item :label="'BU:'">
|
|
<el-select v-model="searchData.buNo" placeholder="请选择" >
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option
|
|
v-for = "i in buList"
|
|
:key = "i.buNo"
|
|
:label = "i.buDesc"
|
|
:value = "i.buNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'模版名称:'">
|
|
<el-input v-model="searchData.name" clearable></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'客户名称:'">
|
|
<el-input v-model="searchData.customName" clearable></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'运输方式:'">
|
|
<el-input v-model="searchData.shippingMode" clearable></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'模版类型:'">
|
|
<el-select filterable v-model="searchData.type" clearable style="width: 140px;">
|
|
<el-option :label="item" :value="item" v-for="(item,index) in types "
|
|
:key="index"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="' '" >
|
|
<el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button>
|
|
<el-button @click="addModelOpen()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-table
|
|
@row-click="changeData"
|
|
highlight-current-row
|
|
:height="height"
|
|
:data="dataList"
|
|
ref="mainTable"
|
|
border
|
|
v-loading="dataListLoading"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
header-align="center"
|
|
align="center"
|
|
width="120"
|
|
fixed="left"
|
|
label="操作">
|
|
<template slot-scope="scope">
|
|
<a type="text" size="small" @click="updateModelOpen(scope.row)">编辑</a>
|
|
<a type="text" size="small" @click="copyModelOpen(scope.row)">复制</a>
|
|
<a type="text" size="small" @click="deleteEcssTemplate(scope.row)">删除</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnList1" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<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>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
<el-pagination
|
|
@size-change="sizeChangeHandle"
|
|
@current-change="currentChangeHandle"
|
|
:current-page="pageIndex"
|
|
:page-sizes="[20, 50, 100, 1000]"
|
|
:page-size="pageSize"
|
|
:total="totalPage"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
|
|
<el-dialog title="维护模版信息" :close-on-click-modal="false" v-drag :visible.sync="addModelFlag" width="500px">
|
|
<el-form label-position="top" style="margin-left: 2px;margin-top: -5px;">
|
|
<el-row :gutter="20">
|
|
<el-col :span="12">
|
|
<el-form-item :label="'BU:'">
|
|
<el-select v-model="addModel.buNo" @change="changeBu" placeholder="请选择" :disabled="addModel.addFlag!==0" style="width: 100%">
|
|
<el-option
|
|
v-for = "i in buList"
|
|
:key = "i.buNo"
|
|
:label = "i.buDesc"
|
|
:value = "i.buNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item :label="''" >
|
|
<template #label>
|
|
<span slot="label" style="" class="big-label">
|
|
<a href="#" @click="openCustom()">客户</a>
|
|
</span>
|
|
</template>
|
|
<el-input v-model="addModel.customName" disabled ></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item :label="'运输方式'" >
|
|
<el-input v-model="addModel.shippingMode"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item :label="'模版类型'" >
|
|
<el-select filterable v-model="addModel.type" placeholder="请选择" :disabled="addModel.addFlag!==0" style="width:100%;">
|
|
<el-option :label="item" :value="item" v-for="(item,index) in types "
|
|
:key="index"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item :label="'模版名称'" >
|
|
<el-input v-model="addModel.name"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='发票'">
|
|
<el-form-item :label="''" >
|
|
<el-checkbox v-model="addModel.hsCodeDesc"><span :title="'物料Hscode是否需要显示品名'">品名</span></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='发票'">
|
|
<el-form-item :label="''" >
|
|
<el-checkbox v-model="addModel.contractFlag"><span :title="'发票导出后抬头改成合同'">合同</span></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单'">
|
|
<el-form-item :label="''" >
|
|
<el-checkbox v-model="addModel.upc"><span :title="'是否需要显示UPC'">UPC</span></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单'">
|
|
<el-form-item :label="''" >
|
|
<el-checkbox v-model="addModel.so"><span :title="'是否需要显示SO'">SO</span></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
|
|
<el-form-item :label="''" >
|
|
<el-checkbox v-model="addModel.goodsLabel"><span :title="'是否需要显示Name of goods等信息'">货物明细</span></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
|
|
<el-form-item :label="''" >
|
|
<el-checkbox v-model="addModel.hsCodeFlag"><span :title="'是否显示Hs Code'">Hs Code</span></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单'">
|
|
<el-form-item :label="''" >
|
|
<el-checkbox v-model="addModel.highPalletFlag"><span :title="'是否显示最高托盘尺寸'">是否显示最高托盘尺寸</span></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
|
|
<el-form-item :label="''" >
|
|
<el-checkbox v-model="addModel.fscWeight"><span :title="'是否需要显示'">是否维护纯FSC纸重量损耗</span></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='发票' || (addModel.type=='箱单' && addModel.buNo==='04-MHM')">
|
|
<el-form-item :label="'品名类型'" :title="'品名显示中文或英文'">
|
|
<el-radio v-model="addModel.hsCodeDescType" label="Y">中文</el-radio>
|
|
<el-radio v-model="addModel.hsCodeDescType" label="N">英文</el-radio>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单'">
|
|
<el-form-item :label="'序号类型'" :title="'天线箱单显示序号还是栈板号'">
|
|
<el-radio v-model="addModel.itemNo" label="Y">序号</el-radio>
|
|
<el-radio v-model="addModel.itemNo" label="N">栈板号</el-radio>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<!-- <el-col :span="12" v-show="addModel.type=='箱单'">
|
|
<el-form-item :label="''" >
|
|
<el-checkbox v-model="addModel.boxChange">显示箱数零头</el-checkbox>
|
|
</el-form-item>
|
|
</el-col>-->
|
|
|
|
|
|
<el-col :span="12" v-show="addModel.type=='箱单'">
|
|
<el-form-item :label="'Shipping Mark'" >
|
|
<el-input v-model="addModel.shippingMark"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单'">
|
|
<el-form-item :label="'栈板重量参数'" >
|
|
<el-input v-model="addModel.palletWeight"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
|
|
<el-form-item :label="'RFID Base Material'" :title="'是否需要显示'">
|
|
<el-checkbox v-model="addModel.material"></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
|
|
<el-form-item :label="'HS Code'" >
|
|
<el-input :disabled="!addModel.material" v-model="addModel.hsCode"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
|
|
<el-form-item :label="'Non-reusable plastic packaging'" :title="'是否需要显示'">
|
|
<el-checkbox v-model="addModel.packaging"></el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
|
|
<el-form-item :label="'plastic packaging'" >
|
|
<el-input :disabled="!addModel.packaging" v-model="addModel.kgs"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='箱单' || addModel.type=='发票'">
|
|
<el-form-item :label="'制造地'" >
|
|
<el-input v-model="addModel.origin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='出口货物委托书'">
|
|
<el-form-item :label="'贸易方式'" >
|
|
<el-input v-model="addModel.salesMethod"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='出口货物委托书'">
|
|
<el-form-item :label="'币制'" >
|
|
<el-input v-model="addModel.currency"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='出口货物委托书'">
|
|
<el-form-item :label="'货物产地'" >
|
|
<el-input v-model="addModel.madeArea"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='出口货物委托书'">
|
|
<el-form-item :label="'发货港'" >
|
|
<el-input v-model="addModel.sendPort"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='出口货物委托书'">
|
|
<el-form-item :label="'唛头'" >
|
|
<el-input v-model="addModel.voyage"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='出口货物委托书'">
|
|
<el-form-item :label="'提/送货日期'" >
|
|
<el-input v-model="addModel.deliveryGoodsDate"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12" v-show="addModel.type=='出口货物委托书'">
|
|
<el-form-item :label="'船期'" >
|
|
<el-input v-model="addModel.shippingDate"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24" v-show="addModel.type=='出口货物委托书'">
|
|
<el-form-item :label="'发货人'" >
|
|
<el-input type="textarea" :rows="4" v-model="addModel.shipper"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24" v-show="addModel.type!=='出口货物委托书'" :style="addModel.type=='出口货物委托书'?'margin-top: 60px':''">
|
|
<el-form-item :label="'备注'" :title="'导出后需要额外显示的信息可在备注里添加'">
|
|
<el-input type="textarea" :rows="3" v-model="addModel.remark"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-footer :style="'height:40px;margin-top: 70px;text-align:center'">
|
|
<el-button type="primary" @click="saveEcssTemplate()">保存</el-button>
|
|
<el-button type="primary" @click="addModelFlag=false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- 复制模版对话框 -->
|
|
<el-dialog title="复制模版" :close-on-click-modal="false" v-drag :visible.sync="copyModelFlag" width="400px">
|
|
<el-form label-position="top" style="margin-left: 2px;margin-top: -5px;">
|
|
<el-row :gutter="20">
|
|
<el-col :span="24">
|
|
<el-form-item label="原模版信息:">
|
|
<el-input v-model="copySourceInfo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="选择目标BU:" required>
|
|
<el-select v-model="copyModel.buNo" placeholder="请选择BU" style="width: 100%">
|
|
<el-option
|
|
v-for="i in buList"
|
|
:key="i.buNo"
|
|
:label="i.buDesc"
|
|
:value="i.buNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="新模版名称:" required>
|
|
<el-input v-model="copyModel.name" placeholder="请输入新模版名称" clearable></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center">
|
|
<el-button type="primary" @click="saveCopyTemplate()">确认复制</el-button>
|
|
<el-button @click="copyModelFlag=false">取消</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<el-dialog title="客户" @close="closeCustomDialog" @open="openCustomDialog" :visible.sync="customFlag" width="559px" v-drag>
|
|
<el-form inline="inline" label-position="top" :model="customData" style="margin-left: 7px;margin-top: -5px;">
|
|
<el-form-item label="客户名称">
|
|
<el-input v-model="customData.ccusname" clearable style="width: 200px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label=" ">
|
|
<el-button type="primary" style="padding: 3px 12px" @click="searchCustomList()">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
:height="400"
|
|
:data="customList"
|
|
stripe
|
|
highlight-current-row
|
|
border
|
|
@row-dblclick="customRowDblclick"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
prop="ccusname"
|
|
header-align="left"
|
|
align="left"
|
|
label="客户名称">
|
|
</el-table-column>
|
|
</el-table>
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center">
|
|
<el-button @click="customFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
<!--列表的组件-->
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam'
|
|
import {} from "@/api/sysLanguage.js"
|
|
import {
|
|
searchEcssTemplateData,
|
|
saveEcssTemplateData,
|
|
deleteEcssTemplate,
|
|
copyEcssTemplate,
|
|
searchCustomList
|
|
}from "@/api/ecss/ecss.js"
|
|
import {getBuList}from '@/api/factory/site.js'
|
|
export default {
|
|
name: "null",
|
|
components:{
|
|
Chooselist,
|
|
},
|
|
data() {
|
|
return {
|
|
types: [ '发票', '箱单', '出口货物委托书'],
|
|
pageIndex: 1,
|
|
pageSize: 100,
|
|
totalPage: 0,
|
|
height: 200,
|
|
buList:[],
|
|
dataList:[],
|
|
dataList2:[],
|
|
dataListLoading: false,
|
|
searchData: {
|
|
page: 1,
|
|
limit: 100,
|
|
buNo:'',
|
|
type:'',
|
|
name:'',
|
|
username:this.$store.state.user.name,
|
|
},
|
|
buttons:{
|
|
search:'查询',
|
|
},
|
|
addModelFlag:false,
|
|
addModel:{
|
|
addFlag:0,
|
|
site:'',
|
|
buNo:'',
|
|
customName:'',
|
|
name:'',
|
|
type:'',
|
|
upc:'',
|
|
so:'',
|
|
fscWeight:'',
|
|
highPalletFlag:'',
|
|
origin:'',
|
|
packaging:'',
|
|
kgs:'',
|
|
shippingMark:'',
|
|
hsCode:'',
|
|
palletWeight:'',
|
|
material:'',
|
|
hsCodeDesc:'',
|
|
contractFlag:'',
|
|
hsCodeDescType:'',
|
|
goodsLabel:'',
|
|
hsCodeFlag:'',
|
|
shippingMode:'',
|
|
remark:'',
|
|
boxChange:'',
|
|
salesMethod :'EXW',
|
|
currency:'USD',
|
|
madeArea:'Shanghai, China',
|
|
sendPort:'Shanghai, China',
|
|
deliveryGoodsDate:'',
|
|
voyage:'',
|
|
shippingDate:'',
|
|
shipper:'Checkpoint Commercial (Shanghai) Co., Ltd. 保点贸易(上海)有限公司\t\t\t\t\t\t\n' +
|
|
'Room 1411, No. 31, Lane 2419, Hunan Road, Pudong New Area, Shanghai\t\t\t\t\t\t\n' +
|
|
'电话/Tel: (86-21)38112888 传真/Fax: (86-21)38112990\t\t\t\t\t\t\n' +
|
|
'上海市浦东新区沪南路2419弄31号1411室\t\t\t\t\t\t\n',
|
|
},
|
|
addDisabledFlag:true,
|
|
activeName:'attribute',
|
|
columnList1: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801007,
|
|
serialNumber: '801007Table1BuDesc',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "buDesc",
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: "BU",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801003,
|
|
serialNumber: '801007Table1EcssTemplateNo',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "customName",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "客户名称",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 240
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801003,
|
|
serialNumber: '801007Table1EcssTemplateNo',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "shippingMode",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "运输方式",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 240
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801003,
|
|
serialNumber: '801007Table1EcssTemplateNo',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "name",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "模版名称",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801003,
|
|
serialNumber: '801007Table1EcssTemplateType',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "type",
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: "模版类型",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801003,
|
|
serialNumber: '801007Table1CreateBy',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "createBy",
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: "创建人",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801003,
|
|
serialNumber: '801007Table1CreateDate',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "createDate",
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: "创建日期",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 140
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801003,
|
|
serialNumber: '801007Table1UpdateBy',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "updateBy",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "修改人",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801003,
|
|
serialNumber: '801007Table1UpdateDate',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "updateDate",
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: "修改日期",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 801003,
|
|
serialNumber: '801007Table1Remark',
|
|
tableId: "801007Table1",
|
|
tableName: "EcssTemplate基础信息",
|
|
columnProp: "remark",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "备注",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},
|
|
],
|
|
currentRow:{},
|
|
customFlag:false,
|
|
customData:{},
|
|
customList:[],
|
|
copyModelFlag: false,
|
|
copyModel: {
|
|
buNo: '',
|
|
name: ''
|
|
},
|
|
copySourceInfo: '',
|
|
copySourceData: {},
|
|
}
|
|
},
|
|
mounted() {
|
|
this.$nextTick(() => {
|
|
this.height = (window.innerHeight - 200);
|
|
})
|
|
},
|
|
methods: {
|
|
// 获取基础数据列表S
|
|
getBaseList(val, type) {
|
|
this.tagNo = val
|
|
this.$nextTick(() => {
|
|
let strVal = ''
|
|
if (val === 33) {
|
|
strVal = this.addModel.codeNo
|
|
}
|
|
this.$refs.baseList.init(val, strVal)
|
|
})
|
|
},
|
|
|
|
/* 列表方法的回调 */
|
|
getBaseData(val) {
|
|
if (this.tagNo === 33) {
|
|
this.addModel.codeNo = val.Code_No
|
|
}
|
|
},
|
|
// 每页数
|
|
sizeChangeHandle (val) {
|
|
this.pageSize = val
|
|
this.pageIndex = 1
|
|
this.searchTable()
|
|
},
|
|
// 当前页
|
|
currentChangeHandle (val) {
|
|
this.pageIndex = val
|
|
this.searchTable()
|
|
},
|
|
searchTable(){
|
|
this.searchData.limit = this.pageSize
|
|
this.searchData.page = this.pageIndex
|
|
searchEcssTemplateData(this.searchData).then(({data}) => {
|
|
//区分请求成功和失败的状况
|
|
if (data && data.code == 0) {
|
|
this.dataList = data.page.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
if(this.dataList.length>0){
|
|
this.$refs.mainTable.setCurrentRow(this.dataList[0]);
|
|
this.changeData(this.dataList[0])
|
|
}else {
|
|
this.changeData(null)
|
|
}
|
|
} else {
|
|
this.dataList = [];
|
|
}
|
|
});
|
|
},
|
|
changeData(row){
|
|
this.currentRow = JSON.parse(JSON.stringify(row));
|
|
this.headerData=row;
|
|
this.refreshCurrentTabTable ();
|
|
},
|
|
refreshCurrentTabTable(){
|
|
if(this.currentRow===''||this.currentRow===null){
|
|
this.currentRow={site:'',hsCode:'',buNo:'',recordType:'',codeNo:''}
|
|
}
|
|
},
|
|
tabClick (tab, event) {
|
|
// 刷新列表数据
|
|
this.refreshCurrentTabTable()
|
|
},
|
|
|
|
getBu () {
|
|
let tempData = {
|
|
username: this.$store.state.user.name,
|
|
}
|
|
getBuList(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.buList = data.row2
|
|
}
|
|
})
|
|
},
|
|
addModelOpen(){
|
|
this.addDisabledFlag=true
|
|
this.addModel={
|
|
addFlag:0,
|
|
site:'',
|
|
buNo:'',
|
|
name:'',
|
|
type:'',
|
|
upc:'',
|
|
so:'',
|
|
origin:'',
|
|
packaging:'',
|
|
fscWeight:'',
|
|
kgs:'',
|
|
shippingMark:'',
|
|
hsCode:'',
|
|
palletWeight:'',
|
|
material:'',
|
|
hsCodeDesc:'',
|
|
contractFlag:'',
|
|
hsCodeDescType:'',
|
|
goodsLabel:true,
|
|
hsCodeFlag:false,
|
|
shippingMode:'',
|
|
remark:'',
|
|
boxChange:'',
|
|
salesMethod :'EXW',
|
|
currency:'USD',
|
|
madeArea:'Shanghai, China',
|
|
sendPort:'Shanghai, China',
|
|
deliveryGoodsDate:'',
|
|
voyage:'',
|
|
shippingDate:'',
|
|
shipper:'Checkpoint Commercial (Shanghai) Co., Ltd. 保点贸易(上海)有限公司\t\t\t\t\t\t\n' +
|
|
'Room 1411, No. 31, Lane 2419, Hunan Road, Pudong New Area, Shanghai\t\t\t\t\t\t\n' +
|
|
'电话/Tel: (86-21)38112888 传真/Fax: (86-21)38112990\t\t\t\t\t\t\n' +
|
|
'上海市浦东新区沪南路2419弄31号1411室\t\t\t\t\t\t\n'
|
|
}
|
|
|
|
this.addModelFlag=true
|
|
},
|
|
updateModelOpen(row){
|
|
this.addDisabledFlag=false
|
|
this.addModel={
|
|
addFlag:1,
|
|
site:row.site,
|
|
buNo:row.buNo,
|
|
name:row.name,
|
|
nameNative:row.name,
|
|
type:row.type,
|
|
upc:row.upc,
|
|
so:row.so,
|
|
origin:row.origin,
|
|
packaging:row.packaging,
|
|
itemNo:row.itemNo,
|
|
fscWeight:row.fscWeight,
|
|
kgs:row.kgs,
|
|
shippingMark:row.shippingMark,
|
|
hsCode:row.hsCode,
|
|
palletWeight:row.palletWeight,
|
|
material:row.material,
|
|
hsCodeDesc:row.hsCodeDesc,
|
|
contractFlag:row.contractFlag,
|
|
hsCodeDescType:row.hsCodeDescType,
|
|
goodsLabel:row.goodsLabel,
|
|
hsCodeFlag:row.hsCodeFlag,
|
|
shippingMode:row.shippingMode,
|
|
remark:row.remark,
|
|
boxChange:row.boxChange,
|
|
customName: row.customName,
|
|
salesMethod :row.salesMethod,
|
|
currency:row.currency,
|
|
madeArea:row.madeArea,
|
|
sendPort:row.sendPort,
|
|
deliveryGoodsDate:row.deliveryGoodsDate,
|
|
voyage:row.voyage,
|
|
shippingDate:row.shippingDate,
|
|
shipper:row.shipper,
|
|
highPalletFlag:row.highPalletFlag,
|
|
}
|
|
this.addModelFlag=true
|
|
},
|
|
deleteEcssTemplate(row){
|
|
this.$confirm('确认删除?', '提示').then(() => {
|
|
deleteEcssTemplate(row).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.searchTable()
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
})
|
|
},
|
|
saveEcssTemplate(){
|
|
if(this.addModel.buNo==null||this.addModel.buNo===''){
|
|
this.$alert('请选择BU!', '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return false
|
|
}
|
|
if(this.addModel.type==null||this.addModel.type===''){
|
|
this.$alert('请选择模版类型!', '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return false
|
|
}
|
|
if(this.addModel.name==null||this.addModel.name===''){
|
|
this.$alert('请输入模版名称!', '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return false
|
|
}
|
|
saveEcssTemplateData(this.addModel).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.searchTable()
|
|
this.addModelFlag = false
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
openCustom () {
|
|
this.customFlag = true;
|
|
},
|
|
|
|
openCustomDialog () {
|
|
//请求
|
|
this.searchCustomList();
|
|
},
|
|
closeCustomDialog () {
|
|
this.customList = []
|
|
this.customFlag = false
|
|
},
|
|
searchCustomList () {
|
|
searchCustomList(this.customData).then(({data}) => {
|
|
if (data && data.code === 0){
|
|
this.customList = data.rows;
|
|
}
|
|
})
|
|
},
|
|
customRowDblclick (row) {
|
|
this.addModel.customName=row.ccusname
|
|
this.customFlag = false
|
|
},
|
|
changeBu(){
|
|
this.addModel.kgs=this.addModel.buNo==='03-RFID'?'4.5':this.addModel.buNo==='01-Label'?'2.5':''
|
|
},
|
|
// 打开复制模版对话框
|
|
copyModelOpen(row) {
|
|
this.copySourceData = JSON.parse(JSON.stringify(row));
|
|
this.copySourceInfo = `${row.buDesc} - ${row.name} (${row.type})`;
|
|
this.copyModel = {
|
|
buNo: '',
|
|
name: row.name
|
|
};
|
|
this.copyModelFlag = true;
|
|
},
|
|
// 保存复制的模版
|
|
saveCopyTemplate() {
|
|
if (!this.copyModel.buNo) {
|
|
this.$alert('请选择目标BU!', '错误', {
|
|
confirmButtonText: '确定'
|
|
});
|
|
return false;
|
|
}
|
|
if (!this.copyModel.name || this.copyModel.name.trim() === '') {
|
|
this.$alert('请输入新模版名称!', '错误', {
|
|
confirmButtonText: '确定'
|
|
});
|
|
return false;
|
|
}
|
|
|
|
// 构建复制请求数据
|
|
const copyData = {
|
|
buNo: this.copyModel.buNo, // 目标BU
|
|
name: this.copyModel.name.trim(), // 新模版名称
|
|
nameNative: this.copySourceData.name, // 原模版名称
|
|
site: this.copySourceData.site // 原模版所在站点
|
|
};
|
|
|
|
copyEcssTemplate(copyData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.searchTable();
|
|
this.copyModelFlag = false;
|
|
this.$message({
|
|
message: '模版复制成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {}
|
|
});
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
});
|
|
}
|
|
});
|
|
}
|
|
},
|
|
activated() {
|
|
this.searchTable()
|
|
},
|
|
created() {
|
|
this.getBu ()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|