123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422 |
- // 船次管理
- <template>
- <div class="container">
- <el-row>
- <el-col :span="20">
- <h2 class="bg-left title">船次管理</h2>
- </el-col>
- <el-col :span="4" class="bg-right">
- <el-button class="bg-bottom" type="primary" size="small" @click="revert()">
- <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
- src="../../../public/img/lujing.png" alt />返回
- </el-button>
- </el-col>
- </el-row>
- <div class="center">
- <el-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules" class="position" label-width="110px">
- <div class="basicInformation">
- <div class="small-title" style="font-size: 16px">任务详情</div>
- <el-row>
- <el-col :span="8">
- <el-form-item label="任务编号" :span="4" prop="processNo">
- <el-input type="text" class="row-item" v-model="deptBudgetList.processNo" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="货名" prop="goodsName">
- <el-input type="text" class="row-item" v-model="deptBudgetList.goodsName" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="重量(吨)" prop="weight">
- <el-input type="text" class="row-item" v-model="deptBudgetList.weight" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="发货地址" prop="sendDetailedAddress">
- <el-input type="text" class="row-item" v-model="fhaddress" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="发货人" prop="sender">
- <el-input type="text" class="row-item" v-model="deptBudgetList.sender" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="发货人电话" prop="senderPhone">
- <el-input type="text" class="row-item" v-model="deptBudgetList.senderPhone" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="收货地址" prop="receiveDetailedAddress">
- <el-input type="text" class="row-item" v-model="shaddress" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="收货人" prop="receiver">
- <el-input type="text" class="row-item" v-model="deptBudgetList.receiver" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="收货人电话" prop="receiverPhone">
- <el-input type="text" class="row-item" v-model="deptBudgetList.receiverPhone" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="发货日期" prop="deliveryDateStart">
- <el-input type="text" class="row-item" v-model="deptBudgetList.deliveryDateStart" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="最晚到货日期" prop="deliveryDateEnd">
- <el-input type="text" class="row-item" v-model="deptBudgetList.deliveryDateEnd" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item v-if="deptBudgetList.taskType=='移库'" label="移库编号" span="1" prop="contractNo">
- <el-input type="text" class="row-item" v-model="deptBudgetList.contractNo" disabled></el-input>
- </el-form-item>
- <el-form-item v-else label="合同编号" span="1" prop="contractNo">
- <el-input type="text" class="row-item" v-model="deptBudgetList.contractNo" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="关联合同" v-if="deptBudgetList.relatedContract" span="1" prop="inOutDate" class="relatedContract">
- <el-input type="text" class="row-item" v-model="deptBudgetList.relatedContract" disabled></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <div class="small-title" style="font-size: 16px">联络员及航次</div>
- <el-row class="myTest">
- <!--当前运输总价-->
- <el-form-item label="当前运输总价(元):" prop="tranPrice" label-width="150px" class="input-item-margin">
- <el-input v-model="deptBudgetList.tranPrice" maxlength="70" disabled />
- </el-form-item>
- <!--审核中的运输总价-->
- <el-form-item label="审核中的运输总价(元):" prop="tranPriceIng" label-width="180px" class="input-item-margin">
- <el-input v-if="deptBudgetList.priceStatus=='审核中'" :disabled="readonly"
- v-model="deptBudgetList.tranPriceIng" maxlength="70" />
- <el-input v-else v-model="deptBudgetList.tranPriceIng" maxlength="70" />
- </el-form-item>
- <div class="input-item-margin">
- <el-button v-if="deptBudgetList.priceStatus=='审核中'" type="primary"
- size="small">{{deptBudgetList.approveStatus}}</el-button>
- <el-button v-else type="primary" @click="priceSubmit()">提交</el-button>
- </div>
- </el-row>
- <div class="content3" v-for="(item, index) in deptBudgetList.tranCarInfoList" :key="index">
- <div class="content3-item1" v-show="index==0">
- <el-col :span="8">
- <el-form-item label="姓名" prop="driver">
- <el-select class="row-item" v-if="item.id != null" :disabled="readonly" v-model="item.driver"
- placeholder="请选择姓名" filterable clearable @change="selectstaff" size="small">
- <el-option v-for="item in options" :key="item.value" :label="item.staffName"
- :value="item.staffName" />
- </el-select>
- <el-select class="row-item" v-else v-model="item.driver" placeholder="请选择姓名" filterable clearable
- @change="selectstaff" size="small">
- <el-option v-for="item in options" :key="item.value" :label="item.staffName"
- :value="item.staffName" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="电话" prop="driverPhone" class="">
- <el-input v-if="item.id != null" :disabled="readonly" :readonly="true" v-model="item.driverPhone"
- placeholder="请输入电话" maxlength="20" size="small" class="" />
- <el-input v-else :readonly="true" v-model="item.driverPhone" placeholder="请输入电话" maxlength="20"
- size="small" class="" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="发船日期" prop="sendDateStart" class="">
- <el-date-picker v-if="item.id != null" :disabled="readonly" v-model="item.sendDateStart" type="date"
- placeholder="请选择发船日期" value-format="yyyy-MM-dd" class="small" />
- <el-date-picker v-else v-model="item.sendDateStart" type="date" placeholder="请选择发船日期"
- value-format="yyyy-MM-dd" class="" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="预计到港日期" prop="receiveDateEnd" class="">
- <el-date-picker v-if="item.id != null" :disabled="readonly" v-model="item.receiveDateEnd" type="date"
- placeholder="请选择发货日期" value-format="yyyy-MM-dd" class="" />
- <el-date-picker v-else v-model="item.receiveDateEnd" type="date" placeholder="请选择发货日期"
- value-format="yyyy-MM-dd" class="" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="航次" prop="shipNo" class="">
- <el-input v-model="item.shipNo" placeholder="请输入航次" maxlength="100" size="small" class=""></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="船名" prop="shipName" class>
- <el-input v-model="item.shipName" placeholder="请输入船名" maxlength="100" size="small" class="">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="类型" prop="shipType" class="">
- <el-select class="row-item" v-model="item.shipType" placeholder="请输入" v-if="item.id != null"
- :disabled="readonly">
- <el-option v-for="items in shipType" :key="items.constKey" :label="items.constValue"
- :value="items.constValue" />
- </el-select>
- <el-select class="row-item" v-model="item.shipType" placeholder="请输入" v-else>
- <el-option v-for="items in shipType" :key="items.constKey" :label="items.constValue"
- :value="items.constValue" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="数量" prop="boxNumber" class="" v-show="item.shipType == '集装箱'">
- <el-input v-if="item.id != null" :disabled="readonly" v-model="item.boxNumber" placeholder="请输入数量"
- class=""></el-input>
- <el-input v-else v-model="item.boxNumber" placeholder="请输入数量" class=""></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="仓位号" prop="binNumber" v-show="item.shipType == '散船'" class="biao6">
- <el-input v-if="item.id != null" :disabled="readonly" v-model="item.binNumber" placeholder="请输入仓位号"
- maxlength="100" size="small"></el-input>
- <el-input v-else v-model="item.binNumber" placeholder="请输入仓位号" maxlength="100" size="small">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="重量(吨)" prop="positionWeight" v-show="item.shipType == '散船'" class="biao7">
- <el-input v-if="item.id != null" :disabled="readonly" v-model="item.positionWeight"
- placeholder="请输入重量" maxlength="100" size="small" class=""></el-input>
- <el-input v-else v-model="item.positionWeight" placeholder="请输入重量" maxlength="100" size="small"
- class=""></el-input>
- </el-form-item>
- </el-col>
- </div>
- <div class="content4" v-show="index!=0">
- <el-form-item label="仓位号" prop="binNumber" v-show="item.shipType == '散船'" class="">
- <el-input v-if="item.id != null" :disabled="readonly" v-model="item.binNumber" placeholder="请输入仓位号"
- maxlength="100"></el-input>
- <el-input v-else v-model="item.binNumber" placeholder="请输入仓位号" maxlength="100"></el-input>
- </el-form-item>
- <el-form-item label="重量(吨)" prop="positionWeight" v-show="item.shipType == '散船'" class="item">
- <el-input v-if="item.id != null" :disabled="readonly" v-model="item.positionWeight" placeholder="请输入重量"
- maxlength="100"></el-input>
- <el-input v-else v-model="item.positionWeight" placeholder="请输入重量" maxlength="100"></el-input>
- </el-form-item>
- <span v-if="(item.status == '未装车'&& item.shipType == '散船') || item.status == null" width="22" height="22"
- class="del" @click="del(index, item)" src="../../../public/img/del.png" alt="">×</span>
- </div>
- </div>
- <div style="text-align: right; color: #8890b1; font-size: 16px; margin-right: -40%"
- v-show="deptBudgetList.tranCarInfoList[0].shipType == '散船'">
- 共{{ total }}/{{ deptBudgetList.weight }}
- </div>
- <!-- <el-button class="add bg-bottom" type="primary" size="small" @click="add"
- v-show="deptBudgetList.tranCarInfoList[0].shipType == '散船'">
- <div class="spans">添加仓位</div>
- </el-button> -->
- </div>
- </el-form>
- <div style="text-align: right; padding: 10px">
- <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
- </div>
- </div>
- </div>
- </template>
- <script>
- import {
- shippingLook,
- packList,
- dispatchCat,
- delhaulagestage,
- setUpTranPrice
- } from '@/model/transport/index'
- import {
- getstaff
- } from '@/model/warehouse/index'
- import Pagination from '@/components/Pagination'
- import WsUpload from '@/components/WsUpload'
- import {
- dayjs
- } from 'base-core-lib'
- export default {
- name: 'viewSpareMoney',
- components: {
- WsUpload,
- Pagination,
- },
- watch: {
- vesselId(val) {
- this.getList()
- },
- isShow(val) {
- this.showType = val
- },
- },
- data() {
- return {
- fhaddress: '',
- shaddress: '',
- //弹出框
- dialogViewSpareMoney: false,
- dialogApproveFormVisible: false,
- // 船舶类型
- monetaryKey: null,
- // 表格显示数据
- tableDate: [],
- // 是否显示
- showType: true,
- // 年
- year: '',
- item: [],
- shipType: [],
- tranType: 3,
- deptBudgetTotal: 0,
- currentPage: 1,
- pageSize: 10,
- searchType: 1,
- searchKeyWord: '',
- contractType: 2,
- startDate: null,
- endDate: null,
- goodnameList: {},
- // 提交类型
- submitType: true,
- storageType: [],
- readonly: true,
- appendixIdsAdd: '',
- uploadSuccess: {},
- onChange: {},
- selectedOptions: [],
- options: [],
- tranCarInfoList: {},
- staffList: [],
- gradeList: [],
- rules: {
- netWeight: [{
- required: true,
- type: 'number',
- message: '请输入活动名称',
- trigger: 'blur',
- }, ],
- },
- arr: [],
- freightspace: [
- // {
- // impurity:'',
- // },
- ],
- size: 10,
- compId: localStorage.getItem('el-pf_compId'),
- deptCircularPage: {},
- packtypeList: {},
- date: {
- year: dayjs().format('YYYY'),
- month: dayjs().format('MM'),
- },
- contractList: [],
- deptBudgetList: {
- warehouseInOutDetail: {},
- },
- historyList: [],
- pickerBeginDateBefore: {
- disabledDate: (time) => {
- return time.getTime() > Date.now()
- },
- },
- accessoryTFs: false,
- }
- },
- mounted() {
- this.getList()
- },
- activated() {
- this.loaddata()
- this.getList()
- },
- computed: {
- totalStorage: function() {
- var maxStorage = 0
- for (var i = 0; i < this.freightspace.length; i++) {
- maxStorage += Number(this.freightspace[i].maxStorage)
- }
- return maxStorage.toFixed(2)
- },
- total: function() {
- if (this.deptBudgetList.tranCarInfoList.length > 0) {
- var maxStorage = 0
- for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
- maxStorage += Number(
- this.deptBudgetList.tranCarInfoList[i].positionWeight
- )
- }
- return maxStorage.toFixed(2)
- }
- },
- },
- methods: {
- getList() {
- getstaff({
- compId: localStorage.getItem('el-pf_compId')
- })
- .toPromise()
- .then((response) => {
- this.options = response
- this.staffList = response
- })
- //类型
- packList({
- constId: 'TRAN4'
- })
- .toPromise()
- .then((response) => {
- this.shipType = response
- })
- },
- dataFilter(val) {
- this.deptBudgetList.personCharge = val
- if (val) {
- console.log(val)
- this.options = this.staffList.filter((item) => {
- if (
- !!~item.staffName.indexOf(val) ||
- !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
- ) {
- return true
- }
- })
- } else {
- this.options = this.staffList
- }
- },
- selectstaff(e) {
- for (var i = 0; i < this.staffList.length; i++) {
- if (this.staffList[i].staffName == e) {
- this.deptBudgetList.driverPhone = this.staffList[i].staffMobilePhone
- this.deptBudgetList.tranCarInfoList[0].driverPhone =
- this.staffList[i].staffMobilePhone
- this.deptBudgetList.personChargeKey = this.staffList[i].staffId
- }
- }
- },
- loaddata() {
- shippingLook({
- id: this.$route.query.id
- })
- .toPromise()
- .then((response) => {
- this.deptBudgetList = response
- if(this.deptBudgetList.tranPriceIng==0){
- this.deptBudgetList.tranPriceIng=''
- }
- this.fhaddress = response.sendPrivate + response.sendCity + response.sendArea + response
- .sendDetailedAddress
- this.shaddress = response.receivePrivate + response.receiveCity + response.receiveArea + response
- .receiveDetailedAddress
- if (response.tranCarInfoList.length > 0) {
- if (response.tranCarInfoList[0].shipType == '集装箱') {
- this.deptBudgetList.tranCarInfoList = [this.deptBudgetList.tranCarInfoList[0]]
- }
- // for (
- // var i = 0;
- // i < this.deptBudgetList.tranCarInfoList.length;
- // i++
- // ) {
- // var num = this.deptBudgetList.tranCarInfoList[
- // i
- // ].positionWeight.split(',')
- // for (var j = 0; j < num.length; j++) {
- // var num2 = num[j].split('/')
- // this.freightspace.push({
- // impurity: num2[i],
- // positionWeight: num2[num2.length - 1]
- // })
- // }
- // }
- } else {
- this.deptBudgetList.tranCarInfoList = [{
- driver: '',
- driverPhone: '',
- sendDateStart: '',
- receiveDateEnd: '',
- shipNo: '',
- shipName: '',
- shipType: '',
- boxNumber: '',
- positionWeight: '',
- binNumber: '',
- tranType: '3',
- }, ]
- }
- })
- },
- //返回按钮
- revert() {
- this.freightspace = []
- this.$router.go(-1)
- },
- del(index, row) {
- if (row.status == null) {
- if (this.deptBudgetList.tranCarInfoList.length > 1) {
- this.deptBudgetList.tranCarInfoList.splice(index, 1)
- }
- } else {
- this.$confirm('船次信息删除后不可恢复,是否确定删除?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- }).then(() => {
- delhaulagestage({
- id: row.id
- })
- .toPromise()
- .then((response) => {
- this.$message.success('删除成功')
- if (this.deptBudgetList.tranCarInfoList.length > 1) {
- this.deptBudgetList.tranCarInfoList.splice(index, 1)
- }
- })
- })
- }
- },
- add() {
- if (!this.deptBudgetList.tranPrice) {
- this.$message({
- message: '请设置运输总价!',
- type: 'warning',
- })
- } else {
- this.deptBudgetList.tranCarInfoList.push({
- driver: this.deptBudgetList.tranCarInfoList[0].driver,
- driverPhone: this.deptBudgetList.tranCarInfoList[0].driverPhone,
- sendDateStart: this.deptBudgetList.tranCarInfoList[0].sendDateStart,
- receiveDateEnd: this.deptBudgetList.tranCarInfoList[0].receiveDateEnd,
- shipNo: this.deptBudgetList.tranCarInfoList[0].shipNo,
- shipName: this.deptBudgetList.tranCarInfoList[0].shipName,
- shipType: this.deptBudgetList.tranCarInfoList[0].shipType,
- binNumber: '',
- positionWeight: '',
- tranType: '3',
- })
- }
- },
- selectdriver() {},
- handleChange(value) {
- this.selectedOptions = value
- },
- returnsales() {
- this.deptBudgetList = {}
- this.freightspace = []
- this.selectedOptions = ''
- this.$router.push({
- path: 'tranManagementShipping'
- })
- },
- //审核
- examine() {
- this.$prompt('运输单价审核', {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- inputValue:this.deptBudgetList.tranPriceIng
- }).then(({
- value
- }) => {
- var tranProcessInfo = {}
- tranProcessInfo.reviewer = localStorage.getItem('el-pf_roleName') +
- localStorage.getItem('el-pf_staffName')
- tranProcessInfo.id = this.deptBudgetList.id
- tranProcessInfo.flag = "2"
- tranProcessInfo.tranPriceIng = value
- tranProcessInfo.tranTypeKey = 3
- setUpTranPrice(tranProcessInfo)
- .toPromise()
- .then((response) => {
- this.$message.success('审核成功')
- this.getList()
- });
- }).catch(() => {
- this.$message.warning(
- '取消审核'
- );
- });
- },
- priceSubmit() {
- this.$confirm(`运输单价将发送给决策人审核,确定提交?`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- })
- .then(() => {
- var tranProcessInfo = {}
- tranProcessInfo.id = this.deptBudgetList.id
- tranProcessInfo.flag = "1"
- tranProcessInfo.tranPriceIng = this.deptBudgetList.tranPriceIng
- tranProcessInfo.tranTypeKey = 3
- setUpTranPrice(tranProcessInfo)
- .toPromise()
- .then((response) => {
- this.$message.success('提交成功')
- this.loaddata()
- })
- })
- .catch(() => {
- return false
- })
- },
- //提交按钮
- submit() {
- if (!this.deptBudgetList.tranPrice) {
- this.$message({
- message: '请设置运输总价!',
- type: 'warning',
- })
- } else {
- for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
- if (!this.deptBudgetList.tranCarInfoList[i].driver) {
- this.$message({
- message: '名字不为空',
- type: 'warning',
- })
- return
- }
- if (!this.deptBudgetList.tranCarInfoList[i].driverPhone) {
- this.$message({
- message: '电话号不为空',
- type: 'warning',
- })
- return
- }
- if (!this.deptBudgetList.tranCarInfoList[i].sendDateStart) {
- this.$message({
- message: '发船时间不能为空',
- type: 'warning',
- })
- return
- }
- if (!this.deptBudgetList.tranCarInfoList[i].receiveDateEnd) {
- this.$message({
- message: '预计到港时间不能为空',
- type: 'warning',
- })
- return
- }
- if (!this.deptBudgetList.tranCarInfoList[i].shipName) {
- this.$message({
- message: '船名不能为空',
- type: 'warning',
- })
- return
- }
- if (!this.deptBudgetList.tranCarInfoList[i].shipNo) {
- this.$message({
- message: '航次不能为空',
- type: 'warning',
- })
- return
- }
- if (this.deptBudgetList.tranCarInfoList[i].shipType == '集装箱') {
- if (!this.deptBudgetList.tranCarInfoList[i].boxNumber) {
- this.$message({
- message: '数量不能为空',
- type: 'warning',
- })
- return
- }
- }
- if (!this.deptBudgetList.tranCarInfoList[i].shipType) {
- this.$message({
- message: '类型不能为空',
- type: 'warning',
- })
- return
- }
- // console.log(this.freightspace,"仓位号")
- if (this.deptBudgetList.tranCarInfoList[i].shipType == '散船') {
- if (!this.deptBudgetList.tranCarInfoList[i].binNumber) {
- this.$message({
- message: '仓位号不能为空',
- type: 'warning',
- })
- return
- }
- if (!this.deptBudgetList.tranCarInfoList[i].positionWeight) {
- this.$message({
- message: '重量不能为空',
- type: 'warning',
- })
- return
- }
- }
- if (
- new Date(
- this.deptBudgetList.tranCarInfoList[0].sendDateStart
- ).getTime() >
- new Date(
- this.deptBudgetList.tranCarInfoList[0].receiveDateEnd
- ).getTime()
- ) {
- this.$message({
- message: '发船时间不能大于最晚到到港时间!',
- type: 'warning',
- })
- return
- }
- }
- this.$confirm(`提交成功后,任务将下发给相关人员,是否确定提交?`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- })
- .then(() => {
- this.$refs.deptBudgetList.validate((valid) => {
- if (valid) {
- this.deptBudgetList.totalStorage = this.totalStorage
- var tranCarInfo = {}
- tranCarInfo.id = this.deptBudgetList.id
- tranCarInfo.infoId = this.deptBudgetList.infoId
- tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
- dispatchCat(tranCarInfo)
- .toPromise()
- .then((response) => {
- this.$message.success('提交成功')
- this.deptBudgetList = {}
- this.freightspace = {}
- this.selectedOptions = ''
- this.$router.go(-1)
- })
- } else {
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- return false
- }
- })
- })
- .catch(() => {
- return false
- })
- }
- },
- handleClose() {
- this.accessoryTFs = false
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`)
- this.pageSize = val
- this.getList()
- },
- handleCurrentChange(val) {
- this.currentPage = val
- console.log(`当前页: ${val}`)
- this.getList()
- },
- selecttaskType(e) {
- for (var i = 0; i < this.taskTypeList.length; i++) {
- if (this.taskTypeList[i].value == e) {
- this.searchType = this.taskTypeList[i].type
- }
- }
- },
- // approve() {},
- // listQuery() {}
- },
- }
- </script>
- <style lang="scss" scoped>
- /deep/.el-form-item--small.el-form-item {
- margin-bottom: 0px
- }
- .input-item-margin {
- margin-right: 20px;
- }
- .row-item {
- width: 100%;
- }
- .bg-right {
- text-align: right;
- padding: 16px 20px;
- }
- .center {
- margin: 0 auto;
- width: 70%;
- }
- //蓝标
- .small-title {
- position: relative;
- padding: 10px;
- font-weight: 600;
- margin-left: 27px;
- }
- //小标题文字
- .small-title::before {
- position: absolute;
- content: '';
- display: block;
- background: #5473e8;
- width: 4px;
- height: 14px;
- left: 0px;
- top: 16px;
- padding: 4px 2px;
- }
- .bg-left {
- padding-left: 30px;
- }
- .title::before {
- content: '';
- display: inline-block;
- width: 5px;
- height: 30px;
- background: #5473e8;
- position: absolute;
- left: 0;
- }
- .myTest {
- display: flex;
- margin: 20px 0;
- // background: green;
- padding-left: 20px;
- align-items: center;
- width: 800px;
- }
- .myTest .el-form-item {
- width: 33.333%;
- }
- .content3 {
- width: calc(100% + 20px);
- .content3-item1 {
- background: #F5F7FA;
- border: 1px solid #E4E7ED;
- border-radius: 5px;
- height: 140px;
- width: 100%;
- padding: 10px 20px 0 0;
- }
- }
- .content4 {
- background: #F5F7FA;
- display: flex;
- margin: 10px 0;
- border: 1px solid #E4E7ED;
- border-radius: 5px;
- position: relative;
- }
- .del {
- position: absolute;
- right: 10px;
- top: 6px;
- cursor: pointer;
- font-size: 20px;
- width: 16px;
- height: 10px;
- }
- // .position {
- // position: relative;
- // }
- // .el-button--primary {
- // background-color: #5878e8;
- // border-color: #5878e8;
- // }
- // .el-col {
- // background: #f6f7fc;
- // }
- // //表格文字
- // /deep/.el-info-table .el-form-item .el-form-item__label {
- // text-align: left;
- // font-size: 14px;
- // font-weight: 400;
- // color: #8890b1;
- // line-height: 16px;
- // }
- // .position .zaizhong {
- // width: 16%;
- // }
- // .bot {
- // width: 30%;
- // }
- // //去边框
- // /deep/.el-form-item {
- // border-right: 0px;
- // border-bottom: 0px;
- // }
- // /deep/.el-info-table {
- // border-left: 0px;
- // border-top: 0px;
- // }
- // .el-info-table .el-form-item .el-form-item__content {
- // border-right: 0px;
- // border-bottom: 0px;
- // border-left: 0px;
- // border-top: 0px;
- // }
- // /deep/.el-info-table .el-form-item {
- // border-right: 0px;
- // border-bottom: 0px;
- // border-left: 0px;
- // border-top: 0px;
- // }
- // /deep/.el-info-table .el-form-item .el-form-item__content {
- // background: #f5f7fa;
- // border-radius: 4px;
- // font-family: PingFangSC-Regular, PingFang SC;
- // margin-bottom: 5px;
- // // background-color: #fff;
- // font-size: 14px;
- // font-weight: 400;
- // color: #8890b1;
- // line-height: 16px;
- // }
- // /deep/.el-info-table .el-form-item .el-form-item__label {
- // background-color: #fff;
- // font-size: 14px;
- // font-family: PingFangSC-Regular, PingFang SC;
- // font-weight: 400;
- // color: #8890b1;
- // line-height: 16px;
- // }
- // //下表格样式
- // .position.siji {
- // background: white;
- // border-radius: 4px;
- // /* border: 1px solid #d8dce6; */
- // // width: 1219px;
- // }
- // /deep/.zi {
- // width: 64px;
- // height: 22px;
- // font-size: 16px;
- // font-family: PingFangSC-Semibold, PingFang SC;
- // font-weight: 600;
- // color: #323233;
- // line-height: 22px;
- // }
- // //表格文字
- // /deep/.el-info-table .el-form-item .el-form-item__label {
- // text-align: left;
- // font-size: 14px;
- // font-weight: 400;
- // color: #8890b1;
- // line-height: 16px;
- // }
- // /deep/.basicInformation {
- // .el-form-item {
- // // width: 25%;
- // .el-form-item__label {
- // background: transparent;
- // border: none;
- // }
- // .el-form-item__content {
- // // border: none;
- // }
- // }
- // }
- // //添加仓位样式
- // .add {
- // width: 100px;
- // height: 34px;
- // background: #f6f7fb;
- // border-radius: 17px;
- // color: #5473e8;
- // font-size: 14px;
- // border: none;
- // margin-top: 8px;
- // }
- // .add img {
- // display: inline-block;
- // margin-top: 3px;
- // margin-left: -12px;
- // }
- // .add .spans {
- // display: table-caption;
- // width: 56px;
- // height: 20px;
- // line-height: 18px;
- // }
- // /deep/.xia {
- // width: 715px;
- // height: 54px;
- // border-radius: 4px;
- // border: 1px solid #d8dce6;
- // margin-top: 10px;
- // background: #f6f7fc;
- // border-radius: 4px;
- // margin-left: 24px;
- // }
- // .basicInformation .el-info-table {
- // border: none;
- // width: 100%;
- // margin: 0 auto;
- // }
- // /deep/.el-select .el-input__inner {
- // border: 1px solid #ccc !important;
- // padding: 0 15px !important;
- // font-size: 12px !important;
- // // width: 125px;
- // }
- // .zhong {
- // background: #f6f7fc;
- // border-radius: 4px;
- // border: 1px solid #d8dce6;
- // width: 100%;
- // }
- // /deep/.zhong .el-form-item {
- // width: 20%;
- // }
- // /deep/.el-input--prefix .el-input__inner {
- // padding-left: 30px;
- // width: 150px;
- // }
- // .ys {
- // // margin-left: 300px;
- // width: 100px;
- // }
- // .biao {
- // margin-left: 240px;
- // margin-top: -57px;
- // }
- // .biao2 {
- // margin-left: 441px;
- // margin-top: -59px;
- // }
- // .biao3 {
- // margin-left: 722px;
- // margin-top: -60px;
- // }
- // .biao4 {
- // margin-left: 1016px;
- // margin-top: -60px;
- // }
- // .biao5 {
- // margin-left: 200px;
- // margin-top: -57px;
- // }
- // .biao6 {
- // margin-left: 450px;
- // margin-top: -57px;
- // }
- // .biao7 {
- // margin-left: 700px;
- // margin-top: -57px;
- // }
- // /deep/.totalStorage .el-input__inner {
- // color: #afb5cb;
- // background: #f5f7fa;
- // }
- // .small-title {
- // position: relative;
- // padding: 10px;
- // font-weight: 600;
- // }
- // .small-title::before {
- // position: absolute;
- // content: '';
- // display: block;
- // background: #5473e8;
- // width: 4px;
- // height: 14px;
- // left: 0px;
- // top: 13px;
- // }
- // .del {
- // // position: absolute;
- // // right: -38px;
- // top: 9px;
- // cursor: pointer;
- // right: 0;
- // display: inline-block;
- // font-size: 20px;
- // width: 16px;
- // height: 10px;
- // line-height: 0px;
- // margin-top: 10px;
- // margin-left: 17px;
- // }
- // .amap-page-container {
- // width: 300px;
- // height: 300px;
- // }
- // /deep/.el-info-table .el-form-item {
- // border-right: 1px solid transparent;
- // border-bottom: 1px solid transparent;
- // width: 33.3333%;
- // }
- // .readonly {
- // position: relative;
- // }
- // .readonly:after {
- // content: '*';
- // color: #ff2727;
- // position: absolute;
- // right: 8px;
- // z-index: 10;
- // top: 21%;
- // font-size: 20px;
- // }
- // .title {
- // position: relative;
- // }
- // .el-button--primary {
- // background-color: #5878e8;
- // border-color: #5878e8;
- // }
- // .el-col {
- // background: #f6f7fc;
- // }
- // /deep/.el-info-table .el-form-item .el-form-item__content {
- // background: #f5f7fa;
- // border-radius: 4px;
- // // border: 1px solid #d8dce6;
- // margin-bottom: 5px;
- // font-size: 14px;
- // font-weight: 400;
- // color: #8890b1;
- // line-height: 16px;
- // padding: 0 25px;
- // // border-left: 1px solid transparent;
- // border: none;
- // }
- // /deep/.el-info-table .el-form-item .el-form-item__label {
- // width: 100px;
- // text-align: center;
- // background: #fff;
- // font-size: 14px;
- // font-weight: 400;
- // color: #8890b1;
- // line-height: 16px;
- // }
- // .button-container {
- // display: flex;
- // flex-wrap: nowrap;
- // justify-content: space-between;
- // align-items: center;
- // background-color: #fff;
- // width: 100%;
- // height: 50px;
- // padding: 0 10px;
- // &>div {
- // margin-left: 10px;
- // display: flex;
- // flex-wrap: nowrap;
- // flex-direction: row;
- // &>span {
- // line-height: 50px;
- // }
- // }
- // /deep/.auditFlow-box {
- // position: unset;
- // margin-left: 10px;
- // &/deep/.auditFlow-icon {
- // width: auto;
- // padding-right: 30px;
- // }
- // &/deep/.auditFlow-main {
- // position: absolute;
- // }
- // }
- // }
- // .box-app {
- // display: inline-block;
- // float: left;
- // margin-left: 30px;
- // line-height: 50px;
- // }
- // /deep/.el-dialog {
- // .el-form-item {
- // margin-bottom: 0 !important;
- // .el-input--medium {
- // textarea {
- // min-height: 100px !important;
- // }
- // }
- // }
- // }
- // .collapse-bottom {
- // margin-bottom: 20px;
- // }
- // .input-main .textarea .el-textarea__inner {
- // width: 100%;
- // z-index: 1;
- // }
- // .bg-left {
- // padding-left: 30px;
- // }
- // .bg-right {
- // padding-right: 10px;
- // text-align: right;
- // }
- // // .el-form-item {
- // // width: 50%;
- // // }
- // .el-form-item__label {
- // text-align: center;
- // }
- // .hide-sel {
- // .el-input__inner {
- // border: 0px;
- // }
- // .el-icon-arrow-up {
- // display: none;
- // }
- // .el-textarea__inner {
- // background-color: #fff !important;
- // border: 0;
- // }
- // .el-date-editor {
- // i {
- // display: none;
- // }
- // }
- // .is-disabled {
- // .el-input__inner:hover {
- // background-color: #fff !important;
- // border: 0;
- // }
- // color: #606266;
- // .el-input__inner {
- // background-color: #fff !important;
- // border: 0;
- // color: #606266;
- // }
- // .el-textarea__inner {
- // background-color: #fff !important;
- // border: 0;
- // color: #606266;
- // }
- // }
- // }
- // // 控制select为只读的时候显示样式
- // /deep/.el-class-table-col {
- // height: auto;
- // padding: 0px 2px;
- // /deep/.el-input__inner {
- // padding: 0px 2px;
- // }
- // }
- // /deep/.is-disabled {
- // .el-input__prefix,
- // .el-input__suffix {
- // display: none;
- // }
- // .el-input__inner {
- // color: #000 !important;
- // font-size: 14px;
- // cursor: text;
- // padding: 0 !important;
- // }
- // }
- // .winseaview-view {
- // padding: 0 0 20px;
- // }
- // .container {
- // overflow: scroll;
- // height: 93vh;
- // }
- // .readonly:after {
- // display: none;
- // }
- // .el-textarea__inner {
- // display: none;
- // }
- // .el-form {
- // margin-top: 50px;
- // padding: 0 15%;
- // }
- // .readonly {
- // width: 16%;
- // }
- // //去边框
- // /deep/.el-form-item {
- // border-right: 0px;
- // border-bottom: 0px;
- // }
- // /deep/.el-info-table {
- // border-left: 0px;
- // border-top: 0px;
- // }
- // /deep/.flex .el-info-table .el-form-item .el-form-item__content {
- // border: 0px;
- // }
- // .add {
- // width: 100px;
- // height: 34px;
- // background: #f6f7fb;
- // border-radius: 17px;
- // color: #5473e8;
- // font-size: 14px;
- // border: none;
- // margin-left: 17px;
- // // margin-left: -79px;
- // }
- // .add img {
- // display: inline-block;
- // margin-top: 3px;
- // margin-left: -12px;
- // }
- // .add .spans {
- // display: table-caption;
- // width: 56px;
- // height: 20px;
- // line-height: 18px;
- // }
- // /deep/.carnum {
- // display: contents;
- // }
- // /deep/.carnum .el-info-table .el-form-item {
- // width: 20%;
- // }
- // // /deep/.liaison .carnum .el-info-table .el-form-item {
- // // border-radius: 10px;
- // // right: 20px;
- // // }
- // /deep/.basicInformation .el-form-item .el-form-item__label {
- // background: transparent;
- // border: none;
- // font-size: 14px;
- // font-family: PingFangSC-Regular, PingFang SC;
- // font-weight: 400;
- // color: #8890b1;
- // line-height: 16px;
- // margin-left: 22px;
- // }
- // // /deep/.el-form-item__content .el-select {
- // // width: 42%;
- // // }
- // //减号
- // .del {
- // position: absolute;
- // // right: -38px;
- // top: 0px;
- // cursor: pointer;
- // right: -1%;
- // display: inline-block;
- // font-size: 20px;
- // width: 20px;
- // height: 10px;
- // line-height: 0px;
- // }
- // .zhong-other {
- // display: flex;
- // margin: 2%;
- // background: #f6f7fc;
- // border-radius: 4px;
- // border: 1px solid #d8dce6;
- // .item {
- // margin: 0;
- // }
- // }
- // /deep/.myTest .el-form-item {
- // width: 30%;
- // }
- </style>
|