szh_zidingyibiaoti
lilu 2 years ago
commit 24b7345e24

@ -596,7 +596,7 @@
</a-modal>
<!-- 弹窗部分 end -->
<!-- 打印弹窗 start -->
<a-modal :zIndex="1200" width="50vw" :maskClosable="false" v-model="PrintModalVisible" title="打印">
<a-modal :zIndex="1005" width="50vw" :maskClosable="false" v-model="PrintModalVisible" title="打印">
<template slot="footer"> <span></span> </template>
<a-spin tip="数据加载中..." :spinning="spinning">
<div class="PrintMain">

@ -42,24 +42,26 @@
</div>
</a-card>
<a-card :bodyStyle="tstyle" :bordered="false">
<div class="title"><i class="iconfont icon-fuwu"></i><span>货物状态</span></div>
<div class="content">
<a-tooltip v-for="(serive, sindex) in booGoodsStatusItem" :key="`${serive.systemCode}_${sindex}`">
<template v-if="serive.finishTime" #title>
<p>时间{{ serive.finishTime }}</p>
<p v-if="serive.remark">{{ serive.remark }}</p>
<p v-if="serive.extData">{{ serive.extData }}</p>
</template>
<div
class="items"
:class="{ active: locaGoodsStatus.includes(serive.systemCode) }"
@click="saveGoodsStatus(serive)"
>
{{ serive.statusName }}
<div class="edit" @click.stop="FnOpenEdit(serive)"><a-icon type="edit" /></div>
</div>
</a-tooltip>
</div>
<a-spin :spinning="spinning" :delay="delayTime">
<div class="title"><i class="iconfont icon-fuwu"></i><span>货物状态</span></div>
<div class="content">
<a-tooltip v-for="(serive, sindex) in booGoodsStatusItem" :key="`${serive.configId}_${sindex}`">
<template v-if="serive.finishTime" #title>
<p>时间{{ serive.finishTime }}</p>
<p v-if="serive.remark">{{ serive.remark }}</p>
<p v-if="serive.extData">{{ serive.extData }}</p>
</template>
<div
class="items"
:class="{ active: locaGoodsStatus.includes(serive.configId) }"
@click="saveGoodsStatus(serive)"
>
{{ serive.statusName }}
<div class="edit" @click.stop="FnOpenEdit(serive)"><a-icon type="edit" /></div>
</div>
</a-tooltip>
</div>
</a-spin>
</a-card>
<a-modal v-model="GoodsStatusVisible" width="600px" title="编辑" @ok="GoodsStatusHandleOk">
<a-form :form="StatusVisibleForm">
@ -305,6 +307,8 @@ export default {
},
data() {
return {
delayTime: 500,
spinning: false,
id: this.$route.query.id,
tstyle: { padding: '0 15px 15px', 'margin-bottom': '10px', background: '#fff' },
remarkModelvisible: false,
@ -365,14 +369,15 @@ export default {
}
if (this.details.goodsStatus) {
// return this.details.goodsStatus.map((item, index) => {
// return item.systemCode
// return item.configId
// })
let data = []
this.details.goodsStatus.forEach(item => {
if (item.finishTime) {
data.push(item.systemCode)
data.push(item.configId)
}
})
console.log(data)
return data
} else {
return []
@ -644,8 +649,8 @@ export default {
this.$message.error('请先保存主单')
return false
}
if (!this.locaGoodsStatus.includes(this.GoodsStatusEditData.systemCode)) {
this.locaGoodsStatus.push(this.GoodsStatusEditData.systemCode)
if (!this.locaGoodsStatus.includes(this.GoodsStatusEditData.configId)) {
this.locaGoodsStatus.push(this.GoodsStatusEditData.configId)
this.details.goodsStatus.push({ ...AData })
}
@ -656,7 +661,7 @@ export default {
this.details.goodsStatus.forEach(item => {
if (item.finishTime) {
if (item.systemCode == this.GoodsStatusEditData.systemCode) {
if (item.configId == this.GoodsStatusEditData.configId) {
ApiData.item.push(AData)
} else {
ApiData.item.push(item)
@ -671,7 +676,7 @@ export default {
// this.booGoodsStatusItem.forEach(item => {
// let type = true
// ApiData.item.forEach(item2 => {
// if (item.systemCode == item2.systemCode) {
// if (item.configId == item2.configId) {
// type = false
// data.push(item2)
// }
@ -716,12 +721,16 @@ export default {
}, 100)
},
saveGoodsStatus(data) {
console.log(data)
if (!this.id) {
this.$message.error('请先保存主单')
return false
}
if (!this.locaGoodsStatus.includes(data.systemCode)) {
this.locaGoodsStatus.push(data.systemCode)
if (!this.locaGoodsStatus.includes(data.configId)) {
console.log(data, 'asdasd', data.configId)
// this.locaGoodsStatus.push(data.configId)
console.log(this.details.goodsStatus)
console.log(this.locaGoodsStatus)
// this.details.goodsStatus.push({ ...data })
this.savegoodsStatusItem(data, 'push')
} else {
@ -732,11 +741,11 @@ export default {
okType: 'danger',
cancelText: '否',
onOk() {
const index = that.locaGoodsStatus.indexOf(data.systemCode)
const index = that.locaGoodsStatus.indexOf(data.configId)
that.locaGoodsStatus.splice(index, 1)
that.details.goodsStatus.forEach((item, index2) => {
if (item.systemCode == data.systemCode) {
if (item.configId == data.configId) {
that.$emit('inGoodsSave', true)
that.details.goodsStatus.splice(index2, 1)
setTimeout(() => {
@ -754,6 +763,7 @@ export default {
}
},
savegoodsStatusItem(data, type) {
console.log(data)
let ApiData = {
bookingId: this.id,
item: []
@ -768,7 +778,7 @@ export default {
let date = new Date(+new Date() + 8 * 3600 * 1000)
ApiData.item.push({ ...data, finishTime: date.toISOString() })
}
this.spinning = true
BookingOrderSaveGoodsStatus(ApiData)
.then(res => {
if (res.success) {
@ -779,9 +789,11 @@ export default {
this.$emit('inGoodsSave', false)
}, 400)
}
this.spinning = false
})
.catch(err => {
console.log(err)
this.spinning = false
})
}
}

@ -120,8 +120,9 @@
</a-form-item>
</a-col>
</a-row>
<a-row :style="{ marginLeft: '36px', marginRight: '33px' }">
<a-col :span="24">
<!-- :style="{ marginLeft: '36px', marginRight: '33px' }" -->
<a-row>
<a-col :span="18">
<a-form-item label="提单信息" :labelCol="labelCol4" :wrapperCol="wrapperCol4" has-feedback>
<a-textarea v-decorator="['tidaninfo']" :auto-size="{ minRows: 3, maxRows: 5 }" />
</a-form-item>
@ -299,7 +300,7 @@ export default {
},
labelCol4: {
xs: { span: 24 },
sm: { span: 1 }
sm: { span: 2 }
},
wrapperCol: {
xs: { span: 25 },
@ -315,7 +316,7 @@ export default {
},
wrapperCol4: {
xs: { span: 25 },
sm: { span: 23 }
sm: { span: 22 }
},
typeData: [],
visible: false,

Loading…
Cancel
Save