| | |
| | | <div class="flex a-center p-3"> |
| | | <el-button type="primary" class="search" @click="exportExcel(false)">导出 | Export</el-button> |
| | | <el-button type="primary" class="search" @click="importExcel">导入 | Import</el-button> |
| | | <a type="primary" class="Download" @click="exportExcel([])">下载模板 | Download Template</a> |
| | | <a type="primary" class="Download" @click="downloadTemplate">下载模板 | Download Template</a> |
| | | </div> |
| | | <el-table :data="tableData" style="width: 100%" border> |
| | | <el-table-column width="200" prop="orderId" align="center"> |
| | |
| | | this.getLists() |
| | | }, |
| | | methods: { |
| | | downloadTemplate() { |
| | | window.open('http://47.108.239.173/compass_template.xlsx', '_blank') |
| | | }, |
| | | handleClick(e, type) { |
| | | this.$router.push({ |
| | | path: '/addOrder', |
| | |
| | | if (!arr) { |
| | | let res = await exportList({ userExtra: localStorage.getItem('extra') }) |
| | | exportData = res.data.map(item => ({ |
| | | '集装箱号 | Container No.': item.ContainerNo, |
| | | '提单号 | BOL No.': item.BolNo, |
| | | '柜型 | Container Type': item.containerType, |
| | | '船司 | Carrier': item.carrier, |
| | | '船名航次 | Vessel Name and Voyage': item.vesselNameAndVoyage, |
| | | '提柜地 | Pickup Location': item.pickupLocation, |
| | | '预计到港 | ETA': item.eta, |
| | | 'SOC': item.soc, |
| | | 'DG': item.dg, |
| | | '是否超重 | Overweight': item.overweight, |
| | | '是否查验 | Exam/Inspection': item.exam, |
| | | 'DROP/LIVE': item.dropOrLive, |
| | | 'Hold': item.hold, |
| | | '客户单号 | Customer Ref. No.': item.customerRefNo, |
| | | '品名 | Commodity': item.commodity, |
| | | '数量 | QTY': item.qty, |
| | | '包装种类 | Packages': item.packages, |
| | | '毛重 | Gr. Wt': item.GrWt, |
| | | '毛重(磅) | Weight (LBs)': item.weightLBS, |
| | | '体积 | Volume': item.volume, |
| | | '收件人 | Consignee': item.consignee, |
| | | '收件人公司 | Company Name': item.companyName, |
| | | '邮编 | Postal Code': item.postalCode, |
| | | '地址 | Address': item.address, |
| | | '联系电话 | Tel': item.tel, |
| | | '邮箱 | Email': item.email, |
| | | '其他联系方式 | Other Contact Information': item.otherContactInformation, |
| | | '备注 | Remarks': item.remarks |
| | | })); |
| | | '集装箱号 | Container No.': item.ContainerNo, |
| | | '提单号 | BOL No.': item.BolNo, |
| | | '柜型 | Container Type': item.containerType, |
| | | '船司 | Carrier': item.carrier, |
| | | '船名航次 | Vessel Name and Voyage': item.vesselNameAndVoyage, |
| | | '提柜地 | Pickup Location': item.pickupLocation, |
| | | '预计到港 | ETA': item.eta, |
| | | 'SOC': item.soc === '是' ? 'Y' : (item.soc === '否' ? 'N' : ''), |
| | | 'DG': item.dg === '是' ? 'Y' : (item.dg === '否' ? 'N' : ''), |
| | | '是否超重 | Overweight': item.overweight === '是' ? 'Y' : (item.overweight === '否' ? 'N' : ''), |
| | | '是否查验 | Exam/Inspection': item.exam === '是' ? 'Y' : (item.exam === '否' ? 'N' : ''), |
| | | 'DROP/LIVE': item.dropOrLive, |
| | | 'Hold': item.hold === '等国内通知派送' ? '等国内通知派送|Client Hold' : |
| | | (item.hold === '扣柜放行' ? '扣柜放行|Client Release' : |
| | | (item.hold === '正常' ? '正常|Normal' : '')), |
| | | '客户单号 | Customer Ref. No.': item.customerRefNo, |
| | | '品名 | Commodity': item.commodity, |
| | | '数量 | QTY': item.qty, |
| | | '包装种类 | Packages': item.packages, |
| | | '毛重 | Gr. Wt': item.GrWt, |
| | | '毛重(磅) | Weight (LBs)': item.weightLBS, |
| | | '体积 | Volume': item.volume, |
| | | '收件人 | Consignee': item.consignee, |
| | | '收件人公司 | Company Name': item.companyName, |
| | | '邮编 | Postal Code': item.postalCode, |
| | | '地址 | Address': item.address, |
| | | '联系电话 | Tel': item.tel, |
| | | '邮箱 | Email': item.email, |
| | | '其他联系方式 | Other Contact Information': item.otherContactInformation, |
| | | '备注 | Remarks': item.remarks |
| | | })); |
| | | } |
| | | // 准备导出数据 |
| | | |
| | |
| | | defval: '', |
| | | header: 1 |
| | | }); |
| | | |
| | | // 获取表头并打印日志 |
| | | const headers = jsonData[0]; |
| | | const headers = jsonData[2]; |
| | | // 验证模板格式 |
| | | const requiredFields = [ |
| | | '集装箱号 | Container No.', |
| | |
| | | } |
| | | |
| | | // 转换数据格式 |
| | | const transformedData = jsonData.slice(1).map(row => { |
| | | const transformedData = jsonData.slice(3).map(row => { |
| | | const item = {}; |
| | | headers.forEach((header, index) => { |
| | | item[header] = row[index] || ''; |
| | |
| | | vesselNameAndVoyage: item['船名航次 | Vessel Name and Voyage'], |
| | | pickupLocation: item['提柜地 | Pickup Location'], |
| | | eta: item['预计到港 | ETA'], |
| | | soc: item['SOC'], |
| | | dg: item['DG'], |
| | | overweight: item['是否超重 | Overweight'], |
| | | exam: item['是否查验 | Exam/Inspection'], |
| | | soc: item['SOC'] === 'Y' ? '是' : (item['SOC'] === 'N' ? '否' : ''), |
| | | dg: item['DG'] === 'Y' ? '是' : (item['DG'] === 'N' ? '否' : ''), |
| | | overweight: item['是否超重 | Overweight'] === 'Y' ? '是' : (item['是否超重 | Overweight'] === 'N' ? '否' : ''), |
| | | exam: item['是否查验 | Exam/Inspection'] === 'Y' ? '是' : (item['是否查验 | Exam/Inspection'] === 'N' ? '否' : ''), |
| | | dropOrLive: item['DROP/LIVE'], |
| | | hold: item['Hold'], |
| | | hold: item['Hold'] ? item['Hold'].split('|')[0] : '', |
| | | customerRefNo: item['客户单号 | Customer Ref. No.'], |
| | | commodity: item['品名 | Commodity'], |
| | | qty: item['数量 | QTY'], |
| | |
| | | remarks: item['备注 | Remarks'] |
| | | }; |
| | | }); |
| | | |
| | | // 使用post方法直接传递数组 |
| | | iptOrder(transformedData).then(res => { |
| | | console.log(res,transformedData); |
| | | |
| | | if (res) { |
| | | this.$message({ |
| | | message: '导入成功', |
| | |
| | | </div>
|
| | | <div class="box_text2">Carrier</div>
|
| | | </div>
|
| | | <el-select :disabled="type != 'add'" v-model="form.carrier" clearable placeholder="请选择">
|
| | | <el-option :label="item.label" :value="item.value" v-for="item in optionsSc"
|
| | | <el-select :disabled="type != 'add'" v-model="form.carrier" clearable placeholder="请选择">
|
| | | <el-option :label="item.code" :value="item.code" v-for="item in optionsSc"
|
| | | :key="item.value"></el-option>
|
| | | </el-select>
|
| | | </div>
|
| | |
| | | <div class="box_text2">Delivery Schedule</div>
|
| | | </div>
|
| | | <el-input v-model="form.deliverySchedule" readonly></el-input>
|
| | |
|
| | | </div>
|
| | | </el-form-item>
|
| | | </div>
|
| | |
| | | <div class="box_text2">Actual Delivery Date</div>
|
| | | </div>
|
| | | <el-input v-model="form.actualSchedule" readonly></el-input>
|
| | |
|
| | | </div>
|
| | | </el-form-item>
|
| | | <el-form-item label="" class="label3" label-width="0px">
|
| | |
| | | <el-input v-model="form.emptyReturnDate" readonly></el-input>
|
| | | </div>
|
| | | </el-form-item>
|
| | | <el-form-item label="" class="label1" label-width="0">
|
| | | <el-form-item label="" class="label1" label-width="0"> |
| | | <div class="flex">
|
| | | <div class="label shrink0">
|
| | | <div class="flex">
|
| | |
| | | <el-input v-model="form.frameNumber" readonly></el-input>
|
| | | </div>
|
| | | </el-form-item>
|
| | | |
| | | </div>
|
| | | <div class="flex">
|
| | | <div class="label shrink0">
|
| | | <div class="flex">
|
| | | <!-- <div class="red">*</div> -->
|
| | | <div class="box_text1">备注:</div>
|
| | | </div>
|
| | | <div class="box_text2">Remarks</div>
|
| | | </div>
|
| | | <el-input type="textarea" :rows="4" v-model="form.customerRemark" readonly style="margin-right: 135px;"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | </el-card>
|
| | | <el-card class="box-card mt-13">
|
| | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { addOrder, getaddress, edit, getDetail, saveInfo } from './addservier'
|
| | | import { addOrder, getaddress, edit, getDetail, saveInfo, getCarrierList } from './addservier'
|
| | | import 'quill/dist/quill.core.css'
|
| | | import 'quill/dist/quill.snow.css'
|
| | | import 'quill/dist/quill.bubble.css'
|
| | |
| | | vesselAndVoyage: "", //航名航次
|
| | | pickupLocation: "", //提柜地
|
| | | ETA: "", //预计到达日期
|
| | | SOC: "", //SOC
|
| | | DG: "", //DG
|
| | | overweight: "", //超重
|
| | | customsInspection: "", //查验
|
| | | SOC: "否", //SOC
|
| | | DG: "否", //DG
|
| | | overweight: "是", //超重
|
| | | customsInspection: "否", //查验
|
| | | dropOrLive: "", //DROP/LIVE
|
| | | clientOrder: "", //客户订单号
|
| | | product: "", //品名
|
| | |
| | | label: "其他",
|
| | | },
|
| | | ],
|
| | | optionsSc: [
|
| | | {
|
| | | value: "COSCO",
|
| | | label: "COSCO",
|
| | | },
|
| | | {
|
| | | value: "OOCL",
|
| | | label: "OOCL",
|
| | | },
|
| | | {
|
| | | value: "ONE",
|
| | | label: "ONE",
|
| | | },
|
| | | {
|
| | | value: "CMA CGM",
|
| | | label: "CMA CGM",
|
| | | },
|
| | | {
|
| | | value: "EVERGREEN",
|
| | | label: "EVERGREEN",
|
| | | },
|
| | | {
|
| | | value: "ZIM",
|
| | | label: "ZIM",
|
| | | },
|
| | | {
|
| | | value: "YANG MING",
|
| | | label: "YANG MING",
|
| | | },
|
| | | {
|
| | | value: "WANHAI LINE",
|
| | | label: "WANHAI LINE",
|
| | | },
|
| | | {
|
| | | value: "MAERSK",
|
| | | label: "MAERSK",
|
| | | },
|
| | | {
|
| | | value: "MSC",
|
| | | label: "MSC",
|
| | | },
|
| | | {
|
| | | value: "HMM",
|
| | | label: "HMM",
|
| | | },
|
| | | {
|
| | | value: "HPL",
|
| | | label: "HPL",
|
| | | },
|
| | | {
|
| | | value: "HDW",
|
| | | label: "HDW",
|
| | | },
|
| | | {
|
| | | value: "T.S.LINE",
|
| | | label: "T.S.LINE",
|
| | | },
|
| | | {
|
| | | value: "SEA LEAD",
|
| | | label: "SEA LEAD",
|
| | | },
|
| | | {
|
| | | value: "SM LINE",
|
| | | label: "SM LINE",
|
| | | },
|
| | | {
|
| | | value: "OTHERS",
|
| | | label: "OTHERS",
|
| | | }
|
| | |
|
| | | ],
|
| | | optionsSc: [],
|
| | | //COSCO、OOCL、ONE、CMA CGM、EVERGREEN(EMC)、ZIM、YANG MING(YML)、WANHAI LINE(WHL)、MAERSK(MSK)、MSC、HMM、HPL、HDW、T.S.LINE、SEA LEAD、SM LINE、OTHERS
|
| | | optionsCpa: [
|
| | | {
|
| | |
| | | }).then(resp => {
|
| | | this.form = resp.data
|
| | | this.detailInfo = resp.data
|
| | | if (resp.data.poundWeight) {
|
| | | resp.data.poundWeight = resp.data.poundWeight.toFixed(2) * 1
|
| | | }
|
| | | |
| | | // if (resp.data.poundWeight) {
|
| | | // resp.data.poundWeight = resp.data.poundWeight.toFixed(2) * 1
|
| | | // }
|
| | | if (resp.data.DOFileUrls) {
|
| | | resp.data.DOFileUrls.map(item => {
|
| | | this.fileList1.push({ url: item.url, name: item.url.split('ownload/')[1] })
|
| | |
| | | this.fileList3.push({ url: item.url, name: item.url.split('ownload/')[1] })
|
| | | })
|
| | | }
|
| | | console.log(resp.data.otherFileUrls,'resp.data.otherFileUrls');
|
| | | |
| | | if (resp.data.otherFileUrls) {
|
| | | console.log(this.fileList4);
|
| | |
|
| | | resp.data.otherFileUrls.map(item => {
|
| | | this.fileList4.push({ url: item.url, name: item.url.split('ownload/')[1] })
|
| | | })
|
| | | |
| | | }
|
| | | })
|
| | | }
|
| | |
| | |
|
| | |
|
| | | })
|
| | | getCarrierList({
|
| | | extra: JSON.parse(localStorage.getItem('userInfo')).extra
|
| | | }).then(resp => {
|
| | | this.optionsSc = resp.data
|
| | | .sort((a, b) => {
|
| | | if (a.code < b.code) return -1
|
| | | if (a.code > b.code) return 1
|
| | | return 0
|
| | | })
|
| | | })
|
| | | },
|
| | | methods: {
|
| | | addShow() {
|
| | |
| | | };
|
| | | //查询提柜地
|
| | | export const getaddress = (data) => {
|
| | | return axios.post("/zj0FFk5wx4S05X-zksJKOZX19c0XC-1", data);
|
| | | };
|
| | | //编辑
|
| | | export const edit = (data) => {
|
| | | return axios.post("/zj0FFk5wx4S05X-zlFb9zLFcA40XL-1", data);
|
| | | };
|
| | | export const getDetail = (data) => {
|
| | | return axios.post("/zj0FFk5wx4S05X-zksTNiUo9S40X7-1", data);
|
| | | };
|
| | | |
| | | export const uploader = (data) => {
|
| | | return axios.post("http://47.108.239.173:2020/api/oss/new_temp_upload", data);
|
| | | };
|
| | | // 保存收件人地址
|
| | | export const saveInfo = (data) => {
|
| | | return axios.post("/zj0FFk5wx4S05X-zmDUo7K2bVQ0XT-1", data);
|
| | | };
|
| | | |
| | | return axios.post("/zj0FFk5wx4S05X-zksJKOZX19c0XC-1", data);
|
| | | };
|
| | | //编辑
|
| | | export const edit = (data) => {
|
| | | return axios.post("/zj0FFk5wx4S05X-zlFb9zLFcA40XL-1", data);
|
| | | };
|
| | | export const getDetail = (data) => {
|
| | | return axios.post("/zj0FFk5wx4S05X-zksTNiUo9S40X7-1", data);
|
| | | };
|
| | |
|
| | | export const uploader = (data) => {
|
| | | return axios.post("http://47.108.239.173:2020/api/oss/new_temp_upload", data);
|
| | | };
|
| | | // 保存收件人地址
|
| | | export const saveInfo = (data) => {
|
| | | return axios.post("/zj0FFk5wx4S05X-zmDUo7K2bVQ0XT-1", data);
|
| | | };
|
| | | // 获取船司
|
| | | export const getCarrierList = (data) => {
|
| | | return axios.post("/zj0FFk5wx4S05X-zngVJ5K8UG80Xu-1", data);
|
| | | };
|