张同海 1 year ago
commit a4f237fad7

@ -1129,3 +1129,11 @@ export function CancelServiceStatus (parameter) {
data: parameter
})
}
export function SaveBookingTxxp (parameter) {
return axios({
url: '/BookingOrder/SaveBookingTxxp',
method: 'post',
params: parameter
})
}

@ -292,8 +292,8 @@ export function TaskManageTruckSendDispatchBatchByTask(parameter) {
export function TaskManageTruckSendDispatch(parameter) {
return axios({
url: '/TaskManageTruck/SendDispatch',
method: 'get',
params: parameter
method: 'post',
data: parameter
})
}
/**

@ -160,8 +160,8 @@
<!-- <div class="round" :class="{ active: serive.isYield }">
<a-icon v-if="serive.isYield" style="color:rgb(48,172,214);font-size: 10px;" type="check" />
</div> -->
<a-icon v-if="serive.isYield" class="serve-icon" type="check-circle" />
<div v-else class="round" >
<a-icon v-if="serive.isYield" class="serve-icon" type="check-circle" />
<div v-else class="round">
</div>
<div class="showName">{{ serive.showName }}</div>
</div>
@ -514,6 +514,7 @@ export default {
bookingServiceItem: [],
atdLoading: false,
booGoodsStatusItem: [],
time:null,
bookingAttachType: [],
changeGoods: true,
attachName: '',
@ -947,8 +948,12 @@ export default {
this.details.log[index].showMore = !this.details.log[index].showMore
this.$forceUpdate()
},
stopTimer() {
window.clearTimeout(this.time);
},
saveService(data) {
var date = new Date();
console.log(date.valueOf())
if (!this.id) {
this.$message.error('请先保存主单')
return false
@ -964,10 +969,15 @@ export default {
item.isYield = !item.isYield
}
})
this.spinning = true
SaveServiceProject(obj).then(res => {
if (res.data.succ) {
this.getServiceItemList(2, data.projectCode)
if (this.time !== null) {
this.stopTimer()
}
this.time = setTimeout(() => {
this.spinning = true
this.getServiceItemList(2, data.projectCode)
}, 500)
} else {
this.$message.error(res.message)
this.spinning = false
@ -980,10 +990,15 @@ export default {
item.isYield = !item.isYield
}
})
this.spinning = true
CancelSeryiceProject(obj).then(res => {
if (res.data.succ) {
this.getServiceItemList(2, data.projectCode)
if (this.time !== null) {
this.stopTimer()
}
this.time = setTimeout(() => {
this.spinning = true
this.getServiceItemList(2, data.projectCode)
}, 500)
} else {
this.$message.error(res.message)
this.spinning = false
@ -1274,15 +1289,17 @@ export default {
font-weight: bold;
&.active {
color: rgb(48,172,214);
color: rgb(48, 172, 214);
}
}
.serve-icon{
font-size:22px;
.serve-icon {
font-size: 22px;
display: block;
margin: 0 auto;
margin-bottom: 5px;
}
.round {
width: 22px;
height: 22px;
@ -1294,8 +1311,9 @@ export default {
text-align: center;
border: 2px solid rgb(146, 146, 146);
margin-bottom: 5px;
&.active {
border: 1px solid rgb(48,172,214);
border: 1px solid rgb(48, 172, 214);
}
}
@ -1312,11 +1330,13 @@ export default {
line-height: 17px;
}
}
.showName{
.showName {
width: 48px;
font-size: 12px;
text-align: center;
}
.box-line {
height: 1px;
width: 10px;
@ -1325,7 +1345,7 @@ export default {
margin-top: 10px;
&.active {
border: 1px solid rgb(48,172,214);
border: 1px solid rgb(48, 172, 214);
}
}

@ -97,8 +97,12 @@
<!-- <div class="nav" @click="handleRefshYZ">
<a-spin :spinning="refshYZloading"><i class="iconfont icon-shishijifei"></i>刷新运踪</a-spin>
</div> -->
<div class="nav"><i class="iconfont icon-xiaopiaodayin"></i>小票状态</div>
<div class="nav" @click="openTraceModel"><i class="iconfont icon-yunshu1"></i>运踪订阅</div>
<div class="nav" @click="handleSearchTxxp">
<a-spin :spinning="txxpLoading"><i class="iconfont icon-xiaopiaodayin"></i>小票状态</a-spin>
</div>
<div class="nav" @click="openTraceModel">
<i class="iconfont icon-yunshu1"></i>运踪订阅
</div>
<div class="nav">
<a-dropdown>
<span> <i
@ -600,6 +604,20 @@
</div>
</a-modal>
<a-modal
title="小票状态查询"
:width="600"
:visible="txxpFlag"
:footer="null"
@cancel="txxpFlag = false">
<div>
<p>提箱小票未申请:{{ txxpForm.noApply }}</p>
<p>提箱小票已申请未打印:{{ txxpForm.applyNoPrint }}</p>
<p>提箱小票已打印:{{ txxpForm.print }}</p>
<p>是否封账:{{ txxpForm.IsLockBooking }}</p>
</div>
</a-modal>
<setFormModel
ref="setForm"
:formData="formData"
@ -913,7 +931,8 @@ import {
singleBCFileRead,
refreshSailingDate,
RefreshBillTrace,
SaveDataInList
SaveDataInList,
SaveBookingTxxp
} from '@/api/modular/main/BookingLedger'
import initData from './modules/initData'
@ -954,6 +973,7 @@ export default {
TaskShippingOrderCompareData: {
showDetailList: ''
},
txxpForm: {},
ResetType: true,
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
advanced: false,
@ -1034,7 +1054,9 @@ export default {
sortLabelList: [],
bcFile: { ext: [] },
bcFileFlag: false,
bcObj: {}
bcObj: {},
txxpLoading: false,
txxpFlag: false
}
},
computed: {
@ -1912,6 +1934,22 @@ export default {
})
}
},
handleSearchTxxp() {
const select = this.$refs.xGrid.getCheckboxRecords()
const pkIdArr = select.map((item, index) => {
return item.id
})
this.txxpLoading = true
SaveBookingTxxp({ Id: pkIdArr[0] }).then(res => {
if (res.success) {
this.txxpFlag = true
this.txxpForm = res.data
} else {
this.$message.error(res.message)
}
this.txxpLoading = false
})
},
dateFtt(fmt, date) {
const o = {
'Y+': date.getFullYear(),
@ -2153,11 +2191,13 @@ export default {
item.sqxsLoading = false
item.ponoLoading = false
let hasGoods = 0
item.goodsStatusList.map((gitem, gindex) => {
if (item.goodsStatusList) {
item.goodsStatusList.map((gitem, gindex) => {
if (gitem.finishTime || gitem.remark) {
hasGoods++
}
})
}
item.hasGoods = hasGoods
this.$set(newBookingList, item.id, item)
return item

@ -49,27 +49,60 @@
<a-row type="flex" :gutter="16">
<a-col>
<div class="nav-box">
<div v-if="type == 'Edit'" class="nav" @click="FnPrint"><i class="iconfont icon-printing"></i></div>
<div v-if="type == 'Add' || 'Edit'" class="nav" @click="handleSubmit">
<i class="iconfont icon-icon_baocun"></i>保存
</div>
<div v-if="type == 'Edit'" class="nav" @click="FnPrint"><i class="iconfont icon-printing"></i></div>
<!-- <div v-if="type == 'Add' || 'Edit'" class="nav" @click="handleSubmit">
<i class="iconfont icon-icon_baocun"></i>
</div> -->
<!-- <div v-if="taskPKId" class="nav" @click="handleSubmit">
<i class="iconfont icon-icon_baocun"></i>分拆派车
</div> -->
<div v-if="type == 'Edit' && !taskPKId" class="nav" @click="FnSubmit">
<i class="iconfont icon-yunshu1"></i>提交派车
<div style="display: inline-block;margin-right: 10px;" v-if="type == 'Add' || 'Edit' && !taskPKId">
<div style="padding: 0px;margin-right: 0px;" class="nav" @click="FnSubmit">
<i class="iconfont icon-yunshu1"></i>保存并提交
</div>
<a-dropdown>
<a-icon style="margin-left: 5px;font-size: 12px;" type="down" />
<a-menu slot="overlay">
<a-menu-item>
<div @click="handleSubmit"></div>
</a-menu-item>
</a-menu>
</a-dropdown>
</div>
<div v-if="taskPKId" class="nav" @click="FnSendCar"><i class="iconfont icon-icon_baocun"></i></div>
<div style="display: inline-block;" v-if="taskPKId">
<div style="padding: 0px;margin-right: 0px;" class="nav" @click="FnSendCar">
<i class="iconfont icon-icon_baocun"></i>保存并派车
</div>
<a-dropdown>
<a-icon style="margin-left: 5px;font-size: 12px;" type="down" />
<a-menu slot="overlay">
<a-menu-item>
<div @click="handleSubmit"></div>
</a-menu-item>
</a-menu>
</a-dropdown>
</div>
<!-- <div v-if="taskPKId" class="nav" @click="FnSendCar"><i class="iconfont icon-icon_baocun"></i></div> -->
<!-- <div v-if="taskPKId" class="nav" @click="handleSubmit"><i class="iconfont icon-icon_baocun"></i></div> -->
<div v-if="taskPKId" class="nav" @click="CancelSendCar">
<i class="iconfont icon-icon_baocun"></i>取消派车
</div>
<div v-if="type == 'Edit' && !taskPKId" class="nav" @click="FnCancel">
<i class="iconfont icon-shanchu1"></i>撤销派车
<div style="display: inline-block;" v-if="type == 'Edit' && !taskPKId">
<div style="padding: 0px;margin-right: 0px;" class="nav" @click="FnCancel">
<i class="iconfont icon-yunshu1"></i>撤销并删除
</div>
<a-dropdown>
<a-icon style="margin-left: 5px;font-size: 12px;" type="down" />
<a-menu slot="overlay">
<a-menu-item>
<div @click="FnDelete"></div>
</a-menu-item>
</a-menu>
</a-dropdown>
</div>
<div v-if="type == 'Edit' && BookingId" class="nav" @click="FnDelete">
<!-- <div v-if="type == 'Edit' && BookingId" class="nav" @click="FnDelete">
<i class="iconfont icon-shanchu1"></i>删除
</div>
</div> -->
</div>
</a-col>
</a-row>
@ -322,7 +355,7 @@
{{ item.shortName }}
</a-select-option>
</a-select>
<a v-if="addrList.length>0" @click="addrsFlag=true"></a>
<a v-if="addrList.length > 0" @click="addrsFlag = true"></a>
</div>
</a-form-item>
</a-col>
@ -340,7 +373,10 @@
sm: { span: 17 }
}"
has-feedback>
<a-textarea style="line-height: 22px;height: 150px;" :auto-size="{ minRows: 3, maxRows: 5 }" v-decorator="['factoryAddr']" />
<a-textarea
style="line-height: 22px;height: 150px;"
:auto-size="{ minRows: 3, maxRows: 5 }"
v-decorator="['factoryAddr']" />
</a-form-item>
</a-col>
<a-col :span="11">
@ -355,7 +391,10 @@
sm: { span: 19 }
}"
has-feedback>
<a-textarea style="line-height: 22px;height: 150px;" :auto-size="{ minRows: 3, maxRows: 5 }" v-decorator="['remark']" />
<a-textarea
style="line-height: 22px;height: 150px;"
:auto-size="{ minRows: 3, maxRows: 5 }"
v-decorator="['remark']" />
</a-form-item>
</a-col>
</a-row>
@ -606,7 +645,11 @@
</a-modal>
<a-modal :footer="null" width="1000px" :maskClosable="false" v-model="addrsFlag" title="选择地址">
<a-button @click="addSelectAddress" style="color: white;" type="primary">添加勾选地址</a-button>
<a-table :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :columns="columns" :data-source="addrList">
<a-table
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:columns="columns"
:data-source="addrList">
<template slot="action" slot-scope="text,record">
<span>
<a @click="handleSelect(record)"></a>
@ -850,21 +893,21 @@ export default {
ChangeFactory(e, option) {
if (e !== undefined) {
this.inFactory.forEach(item => {
if (item.id == option.key) {
if (item.addrs && item.addrs.length > 0) {
this.addrsFlag = true
this.addrList = item.addrs
} else {
const chief = item.chief ? item.chief : ''
const fullNameEN = item.fullNameEN ? item.fullNameEN : ''
const addr = item.addr ? item.addr : ''
const tel = item.tel ? item.tel : ''
this.addrList = []
this.form.setFieldsValue({ factoryAddr: fullNameEN + addr })
this.form.setFieldsValue({ factoryContact: chief + tel })
if (item.id == option.key) {
if (item.addrs && item.addrs.length > 0) {
this.addrsFlag = true
this.addrList = item.addrs
} else {
const chief = item.chief ? item.chief : ''
const fullNameEN = item.fullNameEN ? item.fullNameEN : ''
const addr = item.addr ? item.addr : ''
const tel = item.tel ? item.tel : ''
this.addrList = []
this.form.setFieldsValue({ factoryAddr: fullNameEN + addr })
this.form.setFieldsValue({ factoryContact: chief + tel })
}
}
}
})
})
}
},
handleSelect(row) {
@ -883,13 +926,23 @@ export default {
TaskManageTruckPrintTemplateWithHistoryList(Data).then((res) => {
this.templateType = res.data
this.spinning = false
this.PrintModalVisible = true
if (this.templateType.length > 1) {
this.PrintModalVisible = true
}
if (this.templateType.length == 1) {
this.FnCilckTemplateType(this.templateType[0].id)
}
})
} else {
BookingTruckPrintTemplateWithHistoryList(Data).then((res) => {
this.templateType = res.data
this.spinning = false
this.PrintModalVisible = true
if (this.templateType.length > 1) {
this.PrintModalVisible = true
}
if (this.templateType.length == 1) {
this.FnCilckTemplateType(this.templateType[0].id)
}
})
}
},
@ -946,31 +999,47 @@ export default {
//
FnSendCar() {
if (this.taskPKId) {
TaskManageTruckSendDispatch({ pkId: this.WebData.pK_ID }).then((res) => {
if (res.data.succ) {
this.$message.success('派车成功')
} else {
this.$message.error(`派车失败,${res.data.msg}`)
const {
form: { validateFields }
} = this
validateFields((errors, values) => {
if (!errors) {
values.contaList = this.ContactsData
values = this.FnCompleteName(values)
values.pK_ID = this.WebData.pK_ID
this.confirmLoading = true
TaskManageTruckSendDispatch({ ...values }).then((res) => {
if (res.data.succ) {
this.$message.success('派车成功')
} else {
this.$message.error(`派车失败,${res.data.msg}`)
}
this.confirmLoading = false
})
}
})
} else {
this.confirmLoading = true
TaskManageTruckSendDispatchBatch([this.WebData.pK_ID]).then((res) => {
if (res.data.succ) {
this.$message.success('派车成功')
} else {
this.$message.error(`派车失败,${res.data.msg}`)
}
this.confirmLoading = false
})
}
},
//
CancelSendCar() {
this.confirmLoading = true
TaskManageTruckCancelDispatch({ pkId: this.WebData.pK_ID }).then((res) => {
if (res.data.succ) {
this.$message.success('取消成功')
} else {
this.$message.error(`取消失败,${res.data.msg}`)
}
this.confirmLoading = false
})
},
FnDelete() {
@ -1055,12 +1124,15 @@ export default {
this.GetPrintData('truckBill', printType)
},
FnCancel() {
BookingTruckCancel({ id: this.WebData.id }).then((res) => {
this.confirmLoading = true
BookingTruckCancel({ id: this.WebData.id, isAfterDelete: true }).then((res) => {
if (res.data.succ) {
this.$message.success('撤销成功')
this.$message.success('操作成功')
this.init()
} else {
this.$message.error(`撤销失败,${res.data.msg}`)
this.$message.error(`操作失败,${res.data.msg}`)
}
this.confirmLoading = false
})
},
addSelectAddress() {
@ -1097,11 +1169,21 @@ export default {
if (this.type == 'Edit') {
values.id = this.WebData.id
}
values.bookingId = this.BookingId
BookingTruckSubmit({ ...values })
.then((res) => {
if (res.data.succ) {
this.$message.success('提交成功')
const type = this.type
if (this.type == 'Add' && !this.BookingId) {
this.type = 'Edit'
this.id = res.data.ext
} else if (this.type == 'Add' && this.BookingId) {
this.type = 'Edit'
}
if (type == 'Add') {
this.init()
}
} else {
this.$message.error(`提交失败,${res.data.msg}`)
}

Loading…
Cancel
Save