|
|
@@ -0,0 +1,695 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <trade-card title="基础信息">
|
|
|
+ <avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
+ <template slot="corpId" slot-scope="scope">
|
|
|
+ <crop-select v-model="form.corpId" corpType="KH" :disabled="scope.disabled"
|
|
|
+ @getCorpData="(val)=>{form.corpName = val.cname || ''}"></crop-select>
|
|
|
+ </template>
|
|
|
+ <template slot="shippingCompanyId" slot-scope="scope">
|
|
|
+ <crop-select v-model="form.shippingCompanyId" corpType="GS" :disabled="scope.disabled"
|
|
|
+ @getCorpData="(val)=>{form.shippingCompanyName = val.cname || ''}"></crop-select>
|
|
|
+ </template>
|
|
|
+ <template slot="loadingPortName" slot-scope="scope">
|
|
|
+ <port-info :disabled="scope.disabled" v-model="form.loadingPortId" type="id"
|
|
|
+ @balabalaTow="(val)=>{form.loadingPortName = val.name || ''}"/>
|
|
|
+ </template>
|
|
|
+ <template slot="destinationName" slot-scope="scope">
|
|
|
+ <port-info :disabled="scope.disabled" v-model="form.destinationId" type="id"
|
|
|
+ @balabalaTow="(val)=>{form.destinationName = val.name || ''}"/>
|
|
|
+ </template>
|
|
|
+ <template slot="deliverGoodsAddressName" slot-scope="scope">
|
|
|
+ <port-info :disabled="scope.disabled" v-model="form.deliverGoodsAddressId" type="id"
|
|
|
+ @balabalaTow="(val)=>{form.deliverGoodsAddressName = val.name || ''}"/>
|
|
|
+ </template>
|
|
|
+ <template slot="deliveryAddressName" slot-scope="scope">
|
|
|
+ <port-info :disabled="scope.disabled" v-model="form.deliveryAddressId" type="id"
|
|
|
+ @balabalaTow="(val)=>{form.deliveryAddressName = val.name || ''}"/>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="箱型箱量">
|
|
|
+ <avue-crud :option="optionBox" v-model="formBox" ref="formBox" :data="form.shippingMatchBoxList"
|
|
|
+ @row-save="rowSave"
|
|
|
+ @row-update="rowUpdate"
|
|
|
+ @resetColumn="resetColumnTwo('formBox','optionBox','optionBoxBack',254.1)"
|
|
|
+ @saveColumn="saveColumnTwo('formBox','optionBox','optionBoxBack',254.1)">>
|
|
|
+ <template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
+ <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
|
|
|
+ @click="$refs.formBox.rowEdit(row,index)">编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
|
+ @click="rowDelBox(row,index)">删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="发货信息">
|
|
|
+ <avue-form :option="optionFormFour" v-model="form" ref="formFour">
|
|
|
+ <template slot="consignorId" slot-scope="{disabled}">
|
|
|
+ <crop-select v-model="form.consignorId" corpType="KH" :disabled="disabled"
|
|
|
+ @getCorpData="(val)=>{form.consignorName = val.cname || '';form.consignorDetails = val.details}"></crop-select>
|
|
|
+ </template>
|
|
|
+ <template slot="consigneeId" slot-scope="{disabled}">
|
|
|
+ <crop-select v-model="form.consigneeId" corpType="KH" :disabled="disabled"
|
|
|
+ @getCorpData="(val)=>{form.consigneeName = val.cname || '';form.consigneeDetails = val.details}"></crop-select>
|
|
|
+ </template>
|
|
|
+ <template slot="notifierId" slot-scope="{disabled}">
|
|
|
+ <crop-select v-model="form.notifierId" corpType="KH" :disabled="disabled"
|
|
|
+ @getCorpData="(val)=>{form.notifierName = val.cname || '';form.notifierDetails = val.details}"></crop-select>
|
|
|
+ </template>
|
|
|
+ <template slot="secondNotifierId" slot-scope="{disabled}">
|
|
|
+ <crop-select v-model="form.secondNotifierId" corpType="KH" :disabled="disabled"
|
|
|
+ @getCorpData="(val)=>{form.secondNotifierName = val.cname || ''}"></crop-select>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="默认数据">
|
|
|
+ <avue-form :option="optionFormTwo" v-model="form" ref="formTwo"></avue-form>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="附件管理">
|
|
|
+ <c-upload
|
|
|
+ basic
|
|
|
+ :data="form.shippingFileList"
|
|
|
+ :disabled="disabled"
|
|
|
+ deleteUrl="/api/blade-box-tube/shippingfile/remove"
|
|
|
+ :enumerationValue="254.4"
|
|
|
+ display
|
|
|
+ />
|
|
|
+ </trade-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {tradingBox} from "@/api/oceanShipping/maritimeExport";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "bookingInformation",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ form: {
|
|
|
+ shippingMatchBoxList: [],
|
|
|
+ shippingFileList: []
|
|
|
+ },
|
|
|
+ optionForm: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 6,
|
|
|
+ column: [{
|
|
|
+ label: '客户名称',
|
|
|
+ span: 12,
|
|
|
+ prop: 'corpId',
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ label: '客户电话',
|
|
|
+ prop: 'telephone'
|
|
|
+ }, {
|
|
|
+ label: '邮箱',
|
|
|
+ prop: 'postbox'
|
|
|
+ }, {
|
|
|
+ label: '船公司',
|
|
|
+ span: 12,
|
|
|
+ prop: 'shippingCompanyId'
|
|
|
+ }, {
|
|
|
+ label: '船期',
|
|
|
+ prop: 'sailDate',
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ }, {
|
|
|
+ label: '订舱代理',
|
|
|
+ prop: 'bookingAgentId',
|
|
|
+ filterable: true,
|
|
|
+ type: 'select',
|
|
|
+ dicUrl: "/api/blade-client/corpsdesc/oceanCorpsList?corpsTypeName=订舱代理",
|
|
|
+ props: {
|
|
|
+ label: "cname",
|
|
|
+ value: "id"
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '船名',
|
|
|
+ prop: 'shipId',
|
|
|
+ type: "select",
|
|
|
+ span: 12,
|
|
|
+ cascader: ['voyageNumberId'],
|
|
|
+ dicUrl: "/api/blade-box-tube/shippingvessel/listAll",
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "id",
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '航次',
|
|
|
+ prop: 'voyageNumberId',
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-box-tube/shippingvessel/listAllByVoyage?pid={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "no",
|
|
|
+ value: "id",
|
|
|
+ },
|
|
|
+ change: (data) => {
|
|
|
+ if (data.value) {
|
|
|
+ for (let item of this.$refs.form.DIC.voyageNumberId || []) {
|
|
|
+ if (data.value === item.id) {
|
|
|
+ this.form.route = item.lane
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '提单号',
|
|
|
+ prop: 'mainBillNo'
|
|
|
+ }, {
|
|
|
+ label: '起运港',
|
|
|
+ prop: 'loadingPortName'
|
|
|
+ }, {
|
|
|
+ label: '目的港',
|
|
|
+ prop: 'destinationName'
|
|
|
+ }, {
|
|
|
+ label: '起运地',
|
|
|
+ prop: 'deliverGoodsAddressName'
|
|
|
+ }, {
|
|
|
+ label: '目的地',
|
|
|
+ prop: 'deliveryAddressName'
|
|
|
+ }, {
|
|
|
+ label: '服务条款',
|
|
|
+ prop: 'serviceClause',
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_service_clause",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ },
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: '签单方式',
|
|
|
+ prop: 'signingMethod',
|
|
|
+ overHidden: true,
|
|
|
+ filterable: true,
|
|
|
+ type: 'select',
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_signing_method",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '提单份数',
|
|
|
+ prop: 'billCopies'
|
|
|
+ }, {
|
|
|
+ label: '副本',
|
|
|
+ prop: 'billCopiesCopy'
|
|
|
+ }, {
|
|
|
+ label: '实际开船',
|
|
|
+ prop: 'actualSailDate',
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ }, {
|
|
|
+ label: '截单日期',
|
|
|
+ prop: 'deadline',
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ }, {
|
|
|
+ label: '截港日期',
|
|
|
+ prop: 'closingDate',
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ }, {
|
|
|
+ label: '场站',
|
|
|
+ prop: 'station'
|
|
|
+ }, {
|
|
|
+ label: '件数',
|
|
|
+ prop: 'number'
|
|
|
+ }, {
|
|
|
+ label: '包装',
|
|
|
+ prop: 'packing',
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_packing",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ },
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '重量',
|
|
|
+ prop: 'weight'
|
|
|
+ }, {
|
|
|
+ label: '尺码',
|
|
|
+ prop: 'size'
|
|
|
+ }, {
|
|
|
+ label: '货物',
|
|
|
+ prop: 'goodsId',
|
|
|
+ type: "select",
|
|
|
+ span: 12,
|
|
|
+ dicUrl: "/api/blade-client/goodsdesc/descListAll",
|
|
|
+ props: {
|
|
|
+ label: "cname",
|
|
|
+ value: "id"
|
|
|
+ },
|
|
|
+ change: (data) => {
|
|
|
+ if (data.value) {
|
|
|
+ for (let item of this.$refs.formTwo.DIC.goodsId || []) {
|
|
|
+ if (data.value === item.id) {
|
|
|
+ this.form.goodsDetails = item.nameDescription
|
|
|
+ this.form.hsCode = item.hsCode
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: 'HS代码',
|
|
|
+ span: 12,
|
|
|
+ prop: 'hsCode'
|
|
|
+ }, {
|
|
|
+ label: '货物类型',
|
|
|
+ prop: 'goodsType',
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_goods_type",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ },
|
|
|
+ overHidden: true,
|
|
|
+ change: (data) => {
|
|
|
+ if (data.value) {
|
|
|
+ if (data.value === "冻柜") {
|
|
|
+ this.findObject(this.optionForm.column, "temperature").display = true
|
|
|
+ this.findObject(this.optionForm.column, "ventilationCapacity").display = true
|
|
|
+ this.findObject(this.optionForm.column, "classA").display = false
|
|
|
+ this.findObject(this.optionForm.column, "unNo").display = false
|
|
|
+ this.findObject(this.optionForm.column, "longs").display = false
|
|
|
+ this.findObject(this.optionForm.column, "wide").display = false
|
|
|
+ this.findObject(this.optionForm.column, "high").display = false
|
|
|
+ } else if (data.value === "危险品") {
|
|
|
+ this.findObject(this.optionForm.column, "temperature").display = false
|
|
|
+ this.findObject(this.optionForm.column, "ventilationCapacity").display = false
|
|
|
+ this.findObject(this.optionForm.column, "classA").display = true
|
|
|
+ this.findObject(this.optionForm.column, "unNo").display = true
|
|
|
+ this.findObject(this.optionForm.column, "longs").display = false
|
|
|
+ this.findObject(this.optionForm.column, "wide").display = false
|
|
|
+ this.findObject(this.optionForm.column, "high").display = false
|
|
|
+ } else if (data.value === "特种箱") {
|
|
|
+ this.findObject(this.optionForm.column, "temperature").display = false
|
|
|
+ this.findObject(this.optionForm.column, "ventilationCapacity").display = false
|
|
|
+ this.findObject(this.optionForm.column, "classA").display = false
|
|
|
+ this.findObject(this.optionForm.column, "unNo").display = false
|
|
|
+ this.findObject(this.optionForm.column, "longs").display = true
|
|
|
+ this.findObject(this.optionForm.column, "wide").display = true
|
|
|
+ this.findObject(this.optionForm.column, "high").display = true
|
|
|
+ } else {
|
|
|
+ this.findObject(this.optionForm.column, "temperature").display = false
|
|
|
+ this.findObject(this.optionForm.column, "ventilationCapacity").display = false
|
|
|
+ this.findObject(this.optionForm.column, "classA").display = false
|
|
|
+ this.findObject(this.optionForm.column, "unNo").display = false
|
|
|
+ this.findObject(this.optionForm.column, "longs").display = false
|
|
|
+ this.findObject(this.optionForm.column, "wide").display = false
|
|
|
+ this.findObject(this.optionForm.column, "high").display = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '温度(°C)',
|
|
|
+ prop: 'temperature',
|
|
|
+ display: false
|
|
|
+ }, {
|
|
|
+ label: '通风',
|
|
|
+ prop: 'ventilationCapacity',
|
|
|
+ display: false
|
|
|
+ }, {
|
|
|
+ label: 'CLASS',
|
|
|
+ prop: 'classA',
|
|
|
+ display: false
|
|
|
+ }, {
|
|
|
+ label: 'UN NO.',
|
|
|
+ prop: 'unNo',
|
|
|
+ display: false
|
|
|
+ }, {
|
|
|
+ label: '长',
|
|
|
+ prop: 'longs',
|
|
|
+ display: false
|
|
|
+ }, {
|
|
|
+ label: '宽',
|
|
|
+ prop: 'wide',
|
|
|
+ display: false
|
|
|
+ }, {
|
|
|
+ label: '高',
|
|
|
+ prop: 'high',
|
|
|
+ display: false
|
|
|
+ }, {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remarks',
|
|
|
+ type: 'textarea',
|
|
|
+ span: 24,
|
|
|
+ minRows: 2,
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ formBox: {},
|
|
|
+ optionBox: {},
|
|
|
+ optionBoxBack: {
|
|
|
+ align: 'center',
|
|
|
+ index: true,
|
|
|
+ addBtnText: "录入明细",
|
|
|
+ refreshBtn: false,
|
|
|
+ dialogDrag: true,
|
|
|
+ addBtn: true,
|
|
|
+ span: 8,
|
|
|
+ height: 600,
|
|
|
+ selection: true,
|
|
|
+ addRowBtn: false,
|
|
|
+ cellBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ menuWidth: 140,
|
|
|
+ dialogTop: 25,
|
|
|
+ dialogWidth: "80%",
|
|
|
+ showSummary: true,
|
|
|
+ sumColumnList: [{
|
|
|
+ name: 'emptyWeight',
|
|
|
+ type: 'sum',
|
|
|
+ decimals: 2
|
|
|
+ }],
|
|
|
+ column: [{
|
|
|
+ label: '箱型',
|
|
|
+ prop: 'boxType',
|
|
|
+ width: 100,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_box_ype",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ },
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '箱量',
|
|
|
+ prop: 'boxQuantity',
|
|
|
+ width: 100,
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: 'SOC箱',
|
|
|
+ prop: 'socBox',
|
|
|
+ width: 100,
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '温度',
|
|
|
+ prop: 'temperature',
|
|
|
+ width: 100,
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '温度单位',
|
|
|
+ prop: 'temperatureUnit',
|
|
|
+ width: 100,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_temperature_unit",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ },
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '通风量',
|
|
|
+ prop: 'ventilationCapacity',
|
|
|
+ width: 100,
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '湿度',
|
|
|
+ prop: 'humidity',
|
|
|
+ width: 100,
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remarks',
|
|
|
+ overHidden: true
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ optionFormFour: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 8,
|
|
|
+ column: [{
|
|
|
+ label: '发货人',
|
|
|
+ prop: 'consignorId',
|
|
|
+ }, {
|
|
|
+ label: '发货人详情',
|
|
|
+ prop: 'consignorDetails',
|
|
|
+ type: 'textarea',
|
|
|
+ span: 16,
|
|
|
+ minRows: 1,
|
|
|
+ }, {
|
|
|
+ label: '收货人',
|
|
|
+ prop: 'consigneeId'
|
|
|
+ }, {
|
|
|
+ label: '收货人详情',
|
|
|
+ prop: 'consigneeDetails',
|
|
|
+ type: 'textarea',
|
|
|
+ span: 16,
|
|
|
+ minRows: 1,
|
|
|
+ }, {
|
|
|
+ label: '通知人',
|
|
|
+ prop: 'notifierId'
|
|
|
+ }, {
|
|
|
+ label: '通知人详情',
|
|
|
+ prop: 'notifierDetails',
|
|
|
+ type: 'textarea',
|
|
|
+ span: 16,
|
|
|
+ minRows: 1,
|
|
|
+ }, {
|
|
|
+ label: '第二通知人',
|
|
|
+ prop: 'secondNotifierId',
|
|
|
+ row: true,
|
|
|
+ }, {
|
|
|
+ label: '唛头',
|
|
|
+ prop: 'shippingMark',
|
|
|
+ type: 'textarea',
|
|
|
+ minRows: 1,
|
|
|
+ }, {
|
|
|
+ label: '货描',
|
|
|
+ prop: 'goodsDetails',
|
|
|
+ type: 'textarea',
|
|
|
+ minRows: 1
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ optionFormTwo: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 6,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '系统编号',
|
|
|
+ prop: 'sysNo',
|
|
|
+ disabled: true
|
|
|
+ }, {
|
|
|
+ label: '部门',
|
|
|
+ prop: 'deptId',
|
|
|
+ type: 'tree',
|
|
|
+ props: {
|
|
|
+ label: 'title',
|
|
|
+ value: 'value'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-system/dept/tree'
|
|
|
+ }, {
|
|
|
+ label: '单据类型',
|
|
|
+ prop: 'documentType'
|
|
|
+ }, {
|
|
|
+ label: '业务类型',
|
|
|
+ prop: 'businessType',
|
|
|
+ overHidden: true,
|
|
|
+ filterable: true,
|
|
|
+ type: 'select',
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_business_type",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '业务来源',
|
|
|
+ prop: 'businessSource',
|
|
|
+ overHidden: true,
|
|
|
+ filterable: true,
|
|
|
+ type: 'select',
|
|
|
+ cascader: ['sourceId'],
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_business_source",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '来源',
|
|
|
+ prop: 'sourceId',
|
|
|
+ overHidden: true,
|
|
|
+ filterable: true,
|
|
|
+ span: 12,
|
|
|
+ type: 'select',
|
|
|
+ dicUrl: "/api/blade-client/corpsdesc/oceanCorpsList?corpsTypeName={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "cname",
|
|
|
+ value: "id"
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '货物类型',
|
|
|
+ prop: 'goodsType',
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_goods_type",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ },
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '操作员',
|
|
|
+ prop: 'operatorId',
|
|
|
+ filterable: true,
|
|
|
+ remote: true,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-user/page?size=20¤t=1&account={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "account",
|
|
|
+ value: "id",
|
|
|
+ res: 'data.records'
|
|
|
+ },
|
|
|
+ change: (data) => {
|
|
|
+ if (data.value) {
|
|
|
+ for (let item of this.$refs.formTwo.DIC.operatorId || []) {
|
|
|
+ if (data.value === item.id) {
|
|
|
+ this.form.accountingDeptId = item.deptId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '客服员',
|
|
|
+ prop: 'customerServiceId',
|
|
|
+ span: 12,
|
|
|
+ filterable: true,
|
|
|
+ remote: true,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-user/page?size=20¤t=1&account={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "account",
|
|
|
+ value: "id",
|
|
|
+ res: 'data.records'
|
|
|
+ },
|
|
|
+ change: (data) => {
|
|
|
+ if (data.value) {
|
|
|
+ for (let item of this.$refs.formTwo.DIC.customerServiceId || []) {
|
|
|
+ if (data.value === item.id) {
|
|
|
+ this.form.customerServiceName = item.account
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: '装运方式',
|
|
|
+ prop: 'shipmentMode',
|
|
|
+ overHidden: true,
|
|
|
+ filterable: true,
|
|
|
+ type: 'select',
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_shipment_mode",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ formCreate: false
|
|
|
+ }
|
|
|
+ }, model: {
|
|
|
+ prop: "value",
|
|
|
+ event: "callBack"
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ value: {
|
|
|
+ type: Object,
|
|
|
+ required: true,
|
|
|
+ default: () => {
|
|
|
+ return {};
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ value: {
|
|
|
+ handler(val) {
|
|
|
+ if (this.formCreate) {
|
|
|
+ this.form = Object.assign(this.value, {});
|
|
|
+ } else {
|
|
|
+ this.form = Object.assign(this.value, val || {});
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true
|
|
|
+ },
|
|
|
+ form: {
|
|
|
+ handler(val) {
|
|
|
+ if (this.formCreate) this.setVal();
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.formCreate = true;
|
|
|
+ })
|
|
|
+ this.optionBox = await this.getColumnData(this.getColumnName(254.1), this.optionBoxBack);
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ setVal() {
|
|
|
+ this.$emit("callBack", this.form);
|
|
|
+ },
|
|
|
+ rowDelBox(row, index) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id) {
|
|
|
+ tradingBox(row.id).then(res => {
|
|
|
+ this.shippingBoxTypeList.splice(index, 1);
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.shippingBoxTypeList.splice(index, 1);
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ ;
|
|
|
+ },
|
|
|
+ rowSave(form, done, loading) {
|
|
|
+ done(form)
|
|
|
+ },
|
|
|
+ rowUpdate(form, index, done, loading) {
|
|
|
+ done(form)
|
|
|
+ },
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnTwo(ref, option, optionBack, code) {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumnTwo(ref, option, optionBack, code) {
|
|
|
+ this[option] = this[optionBack];
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|