12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307 |
- //卸船反馈
- <template>
- <div class="container">
- <el-row>
- <el-col :span="12">
- <h2 class="bg-left title">船运卸船反馈</h2>
- </el-col>
- <el-col :span="12" class="bg-right">
- <el-button
- class="bg-bottom"
- type="primary"
- size="small"
- @click="returnsales()"
- ><img
- width="6"
- height="10"
- style="vertical-align: bottom; margin-right: 3px"
- src="../../../public/img/lujing.png"
- alt=""
- />返回</el-button
- >
- </el-col>
- </el-row>
- <ws-form
- class="position"
- ref="deptBudgetList"
- :rules="rules"
- :model="deptBudgetList"
- >
- <div class="small-title" style="font-size: 16px">任务详情</div>
- <ws-info-table>
- <!--任务编号-->
- <ws-form-item label="任务编号" span="1" prop="processNo">
- {{ deptBudgetList.processNo }}
- </ws-form-item>
- <!--货名-->
- <ws-form-item label="货名" span="1" prop="goodsName">
- {{ deptBudgetList.goodsName }}
- </ws-form-item>
- <!--重量(吨)-->
- <ws-form-item label="重量(吨)" span="1" prop="weight">
- {{ deptBudgetList.weight }}
- </ws-form-item>
- <!--发货地址-->
- <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
- {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
- }}{{ deptBudgetList.sendArea }}
- </ws-form-item>
- <!--发货人-->
- <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
- {{ deptBudgetList.sender }}
- </ws-form-item>
- <!--发货人电话-->
- <ws-form-item
- label="发货人电话"
- span="1"
- prop="senderPhone"
- class="readonly"
- >
- {{ deptBudgetList.senderPhone }}
- </ws-form-item>
- <!--收货地址-->
- <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
- {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
- }}{{ deptBudgetList.receiveArea }}
- </ws-form-item>
- <!--收货人-->
- <ws-form-item label="收货人" span="1" prop="receiver">
- {{ deptBudgetList.receiver }}
- </ws-form-item>
- <!--收货人电话-->
- <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
- {{ deptBudgetList.receiverPhone }}
- </ws-form-item>
- <!--发货日期-->
- <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
- {{ deptBudgetList.deliveryDateStart }}
- </ws-form-item>
- <!--最晚到货日期-->
- <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
- {{ deptBudgetList.deliveryDateEnd }}
- </ws-form-item>
- <!--合同编号-->
- <ws-form-item label="合同编号" span="1" prop="contractNo">
- {{ deptBudgetList.contractNo }}
- </ws-form-item>
- <!-- 运输方式 -->
- <ws-form-item label="运输方式" span="1" prop="tranType">
- {{ deptBudgetList.tranType }}
- </ws-form-item>
- </ws-info-table>
- <div class="small-title" style="font-size: 16px">联络员及航次</div>
- <ws-info-table>
- <!-- 姓名 -->
- <ws-form-item label="姓名" span="1" prop="driver">
- {{ deptBudgetList.driver }}
- </ws-form-item>
- <!-- 电话 -->
- <ws-form-item label="电话" span="1" prop="driverPhone">
- {{ deptBudgetList.driverPhone }}
- </ws-form-item>
- <!--发船日期-->
- <ws-form-item label="发船日期" span="1" prop="sendDateStart">
- <ws-date-picker
- v-model="deptBudgetList.sendDateStart"
- type="date"
- placeholder="请选择发船日期"
- value-format="yyyy-MM-dd"
- />
- </ws-form-item>
- <!-- 到港日期 -->
- <ws-form-item label="到港日期" span="1" prop="receiveDateEnd">
- {{ deptBudgetList.receiveDateEnd }}
- </ws-form-item>
- <!-- 船名 -->
- <ws-form-item label="船名" span="1" prop="shipName">
- {{ deptBudgetList.shipName }}
- </ws-form-item>
- <!-- 航次 -->
- <ws-form-item label="航次" span="1" prop="shipNo">
- {{ deptBudgetList.shipNo }}
- </ws-form-item>
- <!-- 类型 -->
- <ws-form-item label="类型" span="1" prop="shipType">
- {{ deptBudgetList.shipType }}
- </ws-form-item>
- <!-- 数量 -->
- <ws-form-item
- label="数量"
- span="1"
- prop="boxNumber"
- v-if="deptBudgetList.shipType == '集装箱'"
- >
- {{ deptBudgetList.boxNumber }}
- </ws-form-item>
- </ws-info-table>
- <div class="small-title" style="font-size: 16px; width: 50%; float: left">
- 卸船详情
- </div>
- <!-- 导入 -->
- <div
- style="
- font-size: 16px;
- width: 100%;
- text-align: right;
- display: flex;
- justify-content: end;
- "
- >
- <el-link
- href="https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/%E5%8F%8D%E9%A6%88%E6%A8%A1%E6%9D%BF/%E8%88%B9%E8%BF%90%E5%8D%B8%E8%BD%A6%E5%8F%8D%E9%A6%88%E6%A8%A1%E6%9D%BF.xlsx"
- style="margin-left: 8px"
- >
- <el-button type="primary">模板下载</el-button>
- </el-link>
- <el-upload
- style="margin-left: 8px"
- class="upload-demo inline-block margin-right-10"
- action=""
- :on-change="handleChange"
- :show-file-list="false"
- accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
- :auto-upload="false"
- >
- <el-button type="primary">导入</el-button>
- </el-upload>
- </div>
- <div class="liaison">
- <div
- style="width: 100%"
- class="flex position"
- v-for="(item, index) in this.freightspace"
- :key="index"
- >
- <ws-info-table>
- <div class="catNos" v-if="item.shipType == '集装箱'">
- 集装箱-{{ index + 1 }}
- <span class="noservice" v-show="item.status == '未装车'">
- 未装船
- </span>
- <span class="service" v-show="item.status == '已装车'">
- 未卸船
- </span>
- <span class="serviced" v-show="item.status == '已送达'">
- 已卸船
- </span>
- </div>
- <div class="catNos" v-if="item.shipType == '散船'">
- 仓位-{{ index + 1 }}
- <span class="noservice" v-show="item.status == '未装车'">
- 未装船
- </span>
- <span class="service" v-show="item.status == '已装车'">
- 未卸船
- </span>
- <span class="serviced" v-show="item.status == '已送达'">
- 已卸船
- </span>
- </div>
- <!--箱号-->
- <el-form-item
- label="箱号"
- prop="caseNo"
- v-if="item.shipType == '集装箱'"
- >
- {{ item.caseNo }}
- </el-form-item>
- <!--封号-->
- <el-form-item
- label="封号"
- prop="titleNo"
- v-if="item.shipType == '集装箱'"
- >
- {{ item.titleNo }}
- </el-form-item>
- <!-- 仓位号 -->
- <ws-form-item
- span="1"
- label="仓位号:"
- prop="binNumber"
- v-if="item.shipType == '散船'"
- >
- {{ item.binNumber }}
- </ws-form-item>
- <!--装船净重-->
- <ws-form-item label="装船净重:" span="1" prop="loadNetWeight">
- {{ item.loadNetWeight }}
- </ws-form-item>
- <!--卸船净重-->
- <ws-form-item label="卸船净重:" span="1" prop="unloadNetWeight">
- <ws-input
- v-if="item.status == '未装车' || item.status == '已送达'"
- :disabled="readonly"
- v-model="item.unloadNetWeight"
- placeholder="请输入卸船净重"
- maxlength="20"
- size="small"
- />
- <ws-input
- v-else
- v-model="item.unloadNetWeight"
- placeholder="请输入卸船净重"
- maxlength="20"
- size="small"
- />
- </ws-form-item>
- <!--卸船日期-->
- <el-form-item
- label="卸船日期:"
- span="1"
- prop="unloadingDate"
- label-width="100px"
- >
- <ws-date-picker
- v-if="item.status == '未装车' || item.status == '已送达'"
- :disabled="readonly"
- v-model="item.unloadingDate"
- type="date"
- style="width: 150px"
- placeholder="请选择日期"
- value-format="yyyy-MM-dd"
- />
- <ws-date-picker
- v-else
- v-model="item.unloadingDate"
- type="date"
- style="width: 150px"
- placeholder="请选择日期"
- value-format="yyyy-MM-dd"
- />
- </el-form-item>
- <!--单价 -->
- <ws-form-item label="单价(元/吨):" span="1" v-if="deptBudgetList.priceType!=null&&deptBudgetList.priceType=='随行就市'" prop="contractPrice">
- <ws-input
- v-model="item.contractPrice"
- placeholder="请输入单价"
- maxlength="20"
- size="small"
- />
- </ws-form-item>
- <div v-show="item.signStatus == '未签合同'" class="signStatus">
- {{ item.signStatus }}
- </div>
- <div v-show="item.signStatus == '已签合同'" class="signStatus1">
- {{ item.signStatus }}
- </div>
- </ws-info-table>
- </div>
- </div>
- <div style="text-align: right; color: #8890b1; font-size: 16px">
- 合计(吨):{{ total }}/{{ deptBudgetList.weight }}
- <!--阶段状态-->
- <span
- class="noservice"
- v-show="deptBudgetList.feedbackStatus == '执行中'"
- >
- 未完货
- </span>
- <span
- class="service"
- v-show="deptBudgetList.feedbackStatus == '已完货'"
- >{{ deptBudgetList.feedbackStatus }}</span
- >
- </div>
- <!--运单-->
- <ws-form-item label="运单:" span="1" prop="unloadPoundImg">
- <!-- slot-scope="scope" -->
- <template>
- <el-upload
- action="https://www.zthymaoyi.com/upload/admin"
- :show-file-list="false"
- :on-success="
- (res) => {
- uploadSuccessHandle1(res)
- }
- "
- class="avatar-uploader"
- accept=".jpg, .jpeg, .png, .gif"
- ><img
- width="18"
- height="20"
- style="vertical-align: text-top; position: relative"
- src="../../../public/img/fujian.png"
- alt=""
- />
- </el-upload>
- <div class="tupian">
- <span
- v-if="
- deptBudgetList.tranCarInfoList.length > 0 &&
- deptBudgetList.tranCarInfoList[0].unloadPoundImg != null
- "
- >{{ pictureTotal }}</span
- >
- <span
- v-if="
- deptBudgetList.tranCarInfoList.length > 0 &&
- deptBudgetList.tranCarInfoList[0].unloadPoundImg == null
- "
- >未上传</span
- >
- <el-button v-if="deptBudgetList.tranCarInfoList.length>0&&deptBudgetList.tranCarInfoList[0].unloadPoundImg != null"
- class="bg-bottom-preview" type="primary" size="small" :data-img="deptBudgetList.tranCarInfoList[0].unloadPoundImg" @click="$imgPreview">预览</el-button>
- </div>
- </template>
- </ws-form-item>
- </ws-form>
- <!-- 完货 -->
- <div style="text-align: right; padding: 10px" class="center">
- <el-button
- class="bg-bottom"
- type="primary"
- size="small"
- @click="submit(deptBudgetList)"
- >提交</el-button
- >
- <el-button
- class="bg-bottom"
- type="primary"
- size="small"
- @click="finished(deptBudgetList)"
- >完货</el-button
- >
- </div>
- </div>
- </template>
- <script>
- import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
- import { seeCat, packList, feedback, stateRec } from '@/model/transport/index'
- import { getstaff } from '@/model/warehouse/index'
- import WsUpload from '@/components/WsUpload'
- import mapDrag from '@/components/mapdrag/mapdrag'
- export default {
- name: 'viewSpareMoney',
- components: {
- WsUpload,
- mapDrag,
- },
- watch: {
- vesselId(val) {
- this.getVesselData()
- },
- isShow(val) {
- this.showType = val
- },
- },
- data() {
- return {
- pictureTotal: 0,
- deptBudgetList: {
- totalStorage: 0,
- },
- tranCarInfoList: {
- driver: '',
- },
- options_: regionData,
- heightData: '600px',
- zoom: 7,
- selectedOptions: [],
- center: [116.244694, 39.517344],
- window: '',
- radio: 1,
- personCharge: [],
- district: null,
- driverList: [],
- readonly: true,
- listDate: { country: '中国', level: 'country', city: '' },
- citylist: [],
- compId: sessionStorage.getItem('ws-pf_compId'),
- rules: {
- warehouseName: [
- {
- required: true,
- message: '请输入仓库名称',
- trigger: 'blur',
- },
- {
- min: 2,
- max: 20,
- message: '仓库名长度不符合要求,请输入2-20字符之内',
- trigger: 'blur',
- },
- ],
- },
- tranType: 1,
- size: 10,
- value1: '',
- unitList: [],
- freightspace1: [
- {
- accountTypeFlag: '1',
- payeeName: '',
- payeeNumberCard: '',
- compName: '',
- bankDeposit: '',
- addressUrlArray: [],
- bankCard: '',
- },
- ],
- freightspace: [
- {
- driver: '',
- driverPhone: '',
- carNo: '',
- loadNetWeight: '',
- unloadPoundImg: '',
- },
- ],
- name: '',
- staffList: [],
- options: [],
- carModel: [],
- tranCarInfoList: {
- unloadPoundImg: '',
- },
- excelFreightspace:[],
- //上传
- accessoryTFs: false,
- fileList: [],
- appendixIdsAdd: '',
- }
- },
- activated() {
- this.deptBudgetList.id = this.$route.query.id
- 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
- },
- total: function () {
- if (this.deptBudgetList.tranCarInfoList != null) {
- var maxStorage = 0
- for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
- maxStorage += Number(
- this.deptBudgetList.tranCarInfoList[i].unloadNetWeight
- )
- }
- return maxStorage
- } else {
- return 0
- }
- },
- },
- methods: {
- handleChange(file, fileList) {
- this.fileTemp = file.raw
- let fileName = file.raw.name
- let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
- // 判断上传文件格式
- if (this.fileTemp) {
- if (fileType == 'xlsx' || fileType == 'xls') {
- this.importf(this.fileTemp)
- } else {
- this.$message({
- type: 'warning',
- message: '附件格式错误,请删除后重新上传!',
- })
- }
- } else {
- this.$message({
- type: 'warning',
- message: '请上传附件!',
- })
- }
- },
- importf(obj) {
- this.excelFreightspace = []
- this.dialogVisible = true
- let _this = this
- let inputDOM = this.$refs.inputer // 通过DOM取文件数据
- this.file = event.currentTarget.files[0]
- var rABS = false //是否将文件读取为二进制字符串
- var f = this.file
- var reader = new FileReader()
- //if (!FileReader.prototype.readAsBinaryString) {
- FileReader.prototype.readAsBinaryString = function (f) {
- var binary = ''
- var rABS = false //是否将文件读取为二进制字符串
- var pt = this
- var wb //读取完成的数据
- var outdata
- var reader = new FileReader()
- reader.onload = function (e) {
- var bytes = new Uint8Array(reader.result)
- var length = bytes.byteLength
- for (var i = 0; i < length; i++) {
- binary += String.fromCharCode(bytes[i])
- }
- var XLSX = require('xlsx')
- if (rABS) {
- wb = XLSX.read(btoa(fixdata(binary)), {
- //手动转化
- type: 'base64',
- })
- } else {
- wb = XLSX.read(binary, {
- type: 'binary',
- })
- }
- // outdata就是你想要的东西 excel导入的数据
- outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]])
- // excel 数据再处理
- let arr = []
- outdata.map((v) => {
- // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
- let jsonString = JSON.stringify(v)
- .replace(/\//g, '')
- .replace(/\s/gi, '')
- console.log(jsonString)
- v = JSON.parse(jsonString)
- let obj = {}
- //xxx代表列名
- obj.caseNo = v.箱号
- obj.titleNo = v.封号
- obj.binNumber = v.仓位号
- obj.positionWeight = v.散船重量
- obj.loadNetWeight = v.装船净重
- obj.unloadNetWeight = v.卸船净重
- obj.unloadingDate = v.卸船日期
- obj.status = v.状态
- obj.shipType = v.类型
- console.log(obj)
- _this.excelFreightspace.push(obj)
- })
- let _ispushData = true
- console.log(arr, _this.freightspace)
- for (let i = 0; i < _this.excelFreightspace.length; i++) {
- _ispushData = true
- for (let k = 0; k < _this.freightspace.length; k++) {
- if (
- _this.excelFreightspace[i].binNumber ==
- _this.freightspace[k].binNumber
- ) {
- _this.freightspace[k] = _this.excelFreightspace[i]
- _ispushData = false
- }
- }
- if (_ispushData) {
- _this.freightspace.push(_this.excelFreightspace[i])
- _ispushData = true
- }
- }
- _this.$forceUpdate();
- }
- reader.readAsArrayBuffer(f)
- }
- if (rABS) {
- reader.readAsArrayBuffer(f)
- } else {
- reader.readAsBinaryString(f)
- }
- console.log(reader)
- },
- dataFilter(val) {
- this.deptBudgetList.personCharge = val
- if (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.freightspace[i].driverPhone = this.staffList[i].staffMobilePhone
- this.deptBudgetList.personChargeKey = this.staffList[i].staffId
- }
- }
- },
- marker: function (item) {
- this.deptBudgetList.warehousePositioning =
- item.lnglat.lat + ',' + item.lnglat.lng
- },
- selectedAddress(e) {
- this.deptBudgetList.warehousePositioning =
- e.center.lat + ',' + e.center.lng
- },
- confirmPositioncity() {
- this.listDate.level = 'city'
- this.listDate.country = this.name
- },
- // 关闭 dialog时 处理文件url 初始化upload组件
- handleClose() {
- this.dialogViewSpareMoney = false
- },
- add() {
- this.freightspace.push({
- driver: '',
- driverPhone: '',
- carNo: '',
- loadNetWeight: '',
- })
- },
- //下拉司机姓名改变事件
- selectdriver() {},
- // handleChange(value) {
- // this.selectedOptions = value
- // },
- returnsales() {
- this.deptBudgetList = {}
- this.freightspace = {}
- this.selectedOptions = ''
- this.deptBudgetList.tranCarInfoList = []
- this.$router.push({ path: 'tranManagementReceivingFeedback' })
- },
- // 上传附件
- uploadSuccess(data, files, url) {
- console.log(data, files, url)
- },
- handleClose() {
- this.accessoryTFs = false
- },
- //导入
- import() {},
- //完货
- finished() {
- this.$confirm(`完货操作后,装船信息不可修改,是否确定完货?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- this.$refs.deptBudgetList.validate((valid) => {
- if (valid) {
- var tranProcessInfo = {}
- tranProcessInfo.id = this.deptBudgetList.id
- tranProcessInfo.weight = this.total
- stateRec(tranProcessInfo)
- .toPromise()
- .then((response) => {
- this.$message.success('完货成功')
- this.deptBudgetList = {}
- this.freightspace = {}
- this.selectedOptions = ''
- this.$router.push({
- path: 'tranManagementReceivingFeedback',
- })
- })
- } else {
- return false
- }
- })
- })
- .catch(() => {
- return false
- })
- },
- submit() {
- for(let i = 0 ; i < this.freightspace.length ; i++){
- if(this.freightspace[i].status== '已装车'){
- if (!this.freightspace[i].unloadNetWeight) {
- this.$message({
- message: '卸船净重不能为空!',
- type: 'warning',
- })
- return
- }
- if (
- (this.freightspace[i].unloadNetWeight &&
- String(this.freightspace[i].unloadNetWeight).indexOf('.') != -1 &&
- String(this.freightspace[i].unloadNetWeight).length -
- (String(this.freightspace[i].unloadNetWeight).indexOf('.') + 1) >
- 2) ||
- this.freightspace[i].unloadNetWeight > 10000 ||
- this.freightspace[i].unloadNetWeight < 0
- ) {
- this.$message({
- message: '卸船净重输入错误',
- type: 'warning',
- })
- return
- }
- if (!this.freightspace[i].unloadingDate) {
- this.$message({
- message: '卸船日期不能为空!',
- type: 'warning',
- })
- return
- }
- if (this.deptBudgetList.priceType!=null&&this.deptBudgetList.priceType=='随行就市'&&!this.freightspace[i].contractPrice) {
- this.$message({
- message: '单价不能为空!',
- type: 'warning',
- })
- return
- }
- }
- }
- this.$confirm(`提交成功后装船信息不可修改,是否确定提交?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- this.$refs.deptBudgetList.validate((valid) => {
- if (valid) {
- // this.deptBudgetList.totalStorage = this.totalStorage
- // this.tranCarInfoList = this.freightspace
- // this.tranCarInfoList.driver = this.deptBudgetList.driver
- // this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
- // this.tranCarInfoList[0].sendDateStart =
- // this.deptBudgetList.sendDateStart
- // this.tranCarInfoList.receiveDateEnd =
- // this.deptBudgetList.receiveDateEnd
- // this.tranCarInfoList.shipName = this.deptBudgetList.shipName
- // this.tranCarInfoList.shipNo = this.shipNo
- // this.tranCarInfoList.shipType = this.deptBudgetList.shipType
- // this.tranCarInfoList.boxNumber = this.deptBudgetList.boxNumber
- // this.tranCarInfoList.unloadingDate =
- // this.deptBudgetList.unloadingDate
- // // this.tranCarInfoList.boxNo = this.arr.toString()
- // for (var i = 0; i < this.tranCarInfoList.length; i++) {
- // this.tranCarInfoList[i].id = this.freightspace[i].id
- // }
- var tranProcessInfo = {}
- tranProcessInfo.id = this.deptBudgetList.id
- tranProcessInfo.infoId = this.deptBudgetList.infoId
- tranProcessInfo.processNo = this.deptBudgetList.processNo
- tranProcessInfo.tranCarInfoList = this.freightspace
- feedback(tranProcessInfo)
- .toPromise()
- .then((response) => {
- this.$message.success('提交成功')
- this.deptBudgetList = {}
- this.freightspace = {}
- this.selectedOptions = ''
- this.$router.push({
- path: 'tranManagementReceivingFeedback',
- })
- })
- } else {
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- return false
- }
- })
- })
- .catch(() => {
- return false
- })
- },
- resetForm(deptBudgetList) {
- this.$refs[deptBudgetList].resetFields()
- },
- getList() {
- seeCat({ id: this.deptBudgetList.id })
- .toPromise()
- .then((response) => {
- this.deptBudgetList = response
- if(response.tranCarInfoList.length > 0){
- this.deptBudgetList.driver = response.tranCarInfoList[0].driver
- this.deptBudgetList.driverPhone =
- response.tranCarInfoList[0].driverPhone
- this.$set(
- this.deptBudgetList,
- 'sendDateStart',
- response.tranCarInfoList[0].sendDateStart
- )
- this.deptBudgetList.receiveDateEnd =
- response.tranCarInfoList[0].receiveDateEnd
- this.deptBudgetList.shipName = response.tranCarInfoList[0].shipName
- this.deptBudgetList.shipNo = response.tranCarInfoList[0].shipNo
- this.deptBudgetList.shipType = response.tranCarInfoList[0].shipType
- this.deptBudgetList.boxNumber = response.tranCarInfoList[0].boxNumber
- //上传附件计数
- if (this.deptBudgetList.tranCarInfoList[0].unloadPoundImg) {
- this.pictureTotal =
- this.deptBudgetList.tranCarInfoList[0].unloadPoundImg.split(
- ','
- ).length
- }
- this.freightspace = response.tranCarInfoList
- }
-
- for (var i = 0; i < this.freightspace.length; i++) {
- if (!this.freightspace[i].loadNetWeight) {
- this.freightspace[i].loadNetWeight = 0
- }
- }
- })
- //司机姓名下拉
- getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
- .toPromise()
- .then((response) => {
- this.options = response
- this.staffList = response
- }),
- //车型
- packList({ constId: 'TRAN5' })
- .toPromise()
- .then((response) => {
- this.carModel = response
- })
- },
- handleExamine() {},
- approve() {},
- selectChapterTwo(e) {
- for (var i = 0; i < this.ChapterTwoList.length; i++) {
- if (this.ChapterTwoList[i].constValue == e) {
- this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
- }
- }
- },
- selectunitList(e) {
- for (var i = 0; i < this.unitList.length; i++) {
- if (this.unitList[i].constValue == e) {
- this.deptBudgetList.acceptanceMethodKey = this.unitList[i].constKey
- }
- }
- },
- selectgrade(e) {
- for (var i = 0; i < this.gradeList.length; i++) {
- if (this.gradeList[i].constValue == e) {
- this.deptBudgetList.gradeKey = this.gradeList[i].constKey
- }
- }
- },
- selectgoodsName(e) {
- for (var i = 0; i < this.goodnameList.length; i++) {
- if (this.goodnameList[i].constValue == e) {
- this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
- }
- }
- },
- selectpackingMethod(e) {
- for (var i = 0; i < this.packtypeList.length; i++) {
- if (this.packtypeList[i].constValue == e) {
- this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
- }
- }
- },
- uploadSuccessHandle1(e, index) {
- this.pictureTotal++
- if (this.deptBudgetList.tranCarInfoList[0].unloadPoundImg) {
- this.deptBudgetList.tranCarInfoList[0].unloadPoundImg += ',' + e.url
- } else {
- this.deptBudgetList.tranCarInfoList[0].unloadPoundImg = e.url
- }
- feedback(this.deptBudgetList)
- .toPromise()
- .then((response) => {})
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- /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;
- }
- .position {
- position: relative;
- }
- .del {
- position: absolute;
- right: -38px;
- top: 14px;
- cursor: pointer;
- right: 0;
- display: inline-block;
- font-size: 26px;
- width: 26px;
- height: 10px;
- line-height: 0px;
- }
- .amap-page-container {
- width: 300px;
- height: 300px;
- }
- .el-form {
- padding: 0 15%;
- }
- /deep/.ws-info-table .el-form-item {
- border-right: 1px solid transparent;
- border-bottom: 1px solid transparent;
- }
- .readonly {
- position: relative;
- }
- .readonly:after {
- content: '*';
- color: #ff2727;
- position: absolute;
- right: 8px;
- z-index: 10;
- top: 21%;
- font-size: 20px;
- }
- .title {
- position: relative;
- }
- .title::before {
- content: '';
- display: inline-block;
- width: 5px;
- height: 30px;
- background: #5473e8;
- position: absolute;
- left: 0;
- }
- .el-button--primary {
- background-color: #5878e8;
- border-color: #5878e8;
- }
- .el-col {
- background: #f6f7fc;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__content {
- padding: 0 25px;
- border-left: 1px solid transparent;
- background: #fff;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__label {
- width: 100px;
- text-align: center;
- background: #fff;
- // border: 1px solid #cdd2dc;
- }
- .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;
- }
- .bg-bottom {
- margin: 15px 0px;
- }
- .wenzi {
- width: 900px;
- margin: 0 auto;
- }
- .wenzi h3 {
- display: inline-block;
- left: 10px;
- }
- .wenzi p {
- display: inline-block;
- }
- .center {
- width: 900px;
- margin: 0 auto;
- }
- .el-form-item {
- width: 50%;
- }
- .el-form-item__label {
- text-align: center;
- }
- .ce {
- width: 900px;
- margin: 0 auto;
- }
- /*.crt-main .textarea /deep/ .el-form-item__label {*/
- /* height: 82px;*/
- /*}*/
- // 控制select为只读的时候显示样式
- .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/.ws-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 {
- // background-color: #fff;
- // border-color: #fff !important;
- // color: #000 !important;
- // font-size: 14px;
- // cursor: text;
- // padding: 0 !important;
- // }
- // }
- .winseaview-view {
- padding: 0 0 20px;
- }
- .container {
- overflow: scroll;
- height: 93vh;
- }
- .ws-info-table .el-form-item {
- width: 33.3333%;
- }
- .readonly:after {
- display: none;
- }
- .el-textarea__inner {
- display: none;
- }
- .el-form {
- margin-top: 50px;
- }
- .readonly {
- width: 16%;
- }
- //去边框
- /deep/.el-form-item {
- border-right: 0px;
- border-bottom: 0px;
- }
- /deep/.ws-info-table {
- border-left: 0px;
- border-top: 0px;
- }
- .ws-info-table .el-form-item .el-form-item__content {
- border: none;
- }
- /deep/.ws-info-table .el-form-item {
- border: none;
- height: 50px;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__content {
- background: #f5f7fa;
- border-radius: 4px;
- border: 1px solid #d8dce6;
- font-family: PingFangSC-Regular, PingFang SC;
- margin-bottom: 5px;
- background-color: #fff;
- font-size: 14px;
- font-weight: 400;
- color: #8890b1;
- line-height: 16px;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__label {
- background-color: #fff;
- font-size: 13px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #8890b1;
- line-height: 16px;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__content {
- background: #f5f7fa;
- border-radius: 4px;
- border: 1px solid #d8dce6;
- }
- /deep/.flex .ws-info-table .el-form-item .el-form-item__content {
- border: 0px;
- }
- //联络员及车次
- /deep/.liaison .ws-info-table .el-form-item {
- width: 20%;
- }
- /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
- width: 50%;
- background: #f6f7fc;
- }
- /deep/.liaison .flex {
- display: contents;
- }
- /deep/.liaison .ws-info-table {
- background: #f6f7fc;
- border-radius: 4px;
- border: 1px solid #d8dce6;
- margin-top: 20px;
- }
- .catNos {
- width: 100%;
- height: 30px;
- margin-top: 10px;
- margin-left: 20px;
- font-size: 14px;
- }
- .catNosCor {
- color: #5473e8;
- }
- .add {
- width: 130px;
- height: 34px;
- background: #f6f7fb;
- border-radius: 17px;
- color: #5473e8;
- font-size: 14px;
- border: none;
- }
- .add img {
- display: inline-block;
- margin-top: 3px;
- margin-left: -30px;
- }
- .add .spans {
- display: table-caption;
- width: 56px;
- height: 20px;
- line-height: 18px;
- }
- .signStatus {
- height: 25px;
- border-radius: 3px;
- border: 1px solid #5473e8;
- padding: 0 3px;
- color: #ffffff;
- background: #c4cada;
- line-height: 24px;
- margin-left: 18px;
- }
- .signStatus1 {
- height: 25px;
- background: #e6ebff;
- border-radius: 3px;
- border: 1px solid #5473e8;
- padding: 0 3px;
- margin-left: 18px;
- color: #5473e8;
- line-height: 24px;
- }
- .line {
- height: 26px;
- margin-top: 6px;
- left: 2px;
- }
- /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
- padding: 0px;
- }
- .noservice {
- background: #c4cada;
- color: #ffffff;
- }
- .serviced {
- background: #e5f1f7;
- color: #5473E8 ;
- }
- .service {
- background: #e5f1f7;
- color: #50cad4;
- }
- .center1 {
- width: 100px;
- margin: 0 auto;
- margin-top: -2%;
- }
- .tupian {
- margin-left: 14%;
- margin-top: -7%;
- }
- </style>
|