1 #6

Merged
caoliancun merged 1 commits from caolc into master 2 years ago
  1. 29
      src/components/generalDetails/index.vue
  2. 27
      src/views/order/components/billOfLading.vue
  3. 1
      src/views/order/index.vue

@ -11,11 +11,7 @@
<div class="generalDetails_card_container"> <div class="generalDetails_card_container">
<div v-for="(item, index) in dataPage" :key="index"> <div v-for="(item, index) in dataPage" :key="index">
<el-card class="generalDetails_card"> <el-card class="generalDetails_card">
<div <div @click="isShow(item)" class="generalDetails_card_header" slot="header">
@click="isShow(item)"
class="generalDetails_card_header"
slot="header"
>
<div> <div>
<span class="generalDetails-card-header-icon"> <span class="generalDetails-card-header-icon">
<svg-icon style="color: #118dde" :icon-class="item.iconClass" /> <svg-icon style="color: #118dde" :icon-class="item.iconClass" />
@ -25,30 +21,18 @@
}}</span> }}</span>
</div> </div>
<div class="fold"> <div class="fold">
<i <i :style="{
:style="{
transform: `rotate(${item.isFold ? 0 : 180}deg)`, transform: `rotate(${item.isFold ? 0 : 180}deg)`,
}" }" class="el-icon-arrow-down generalDetails_card_arrow_down"></i>
class="el-icon-arrow-down generalDetails_card_arrow_down"
></i>
</div> </div>
</div> </div>
<div <div :style="{ maxHeight: item.isFold ? '100vh' : '0px' }" class="my-cell">
:style="{ maxHeight: item.isFold ? '100vh' : '0px' }" <template v-if="item.listData.length && item.listData[0].field !== 'table'">
class="my-cell"
>
<template
v-if="item.listData.length && item.listData[0].field !== 'table'"
>
<div v-for="(i, x) in item.listData" :key="x" class="cell-item"> <div v-for="(i, x) in item.listData" :key="x" class="cell-item">
<span :title="i.remark" class="color-999 test-tst"> <span :title="i.remark" class="color-999 test-tst">
{{ i.label }} {{ i.label }}
<i v-if="i.remark" class="header-icon el-icon-info"></i> <i v-if="i.remark" class="header-icon el-icon-info"></i>
<i <i @click="isCopy($event)" v-if="i.isCopy" class="el-icon-document-copy"></i>
@click="isCopy($event)"
v-if="i.isCopy"
class="el-icon-document-copy"
></i>
</span> </span>
<br /> <br />
<slot class="inner-data" :name="`${i.field}`"> <slot class="inner-data" :name="`${i.field}`">
@ -172,6 +156,7 @@ export default {
.title_bottom { .title_bottom {
margin-top: 20px; margin-top: 20px;
} }
.fold { .fold {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;

@ -227,10 +227,13 @@ export default {
this.billListMeth() this.billListMeth()
// this.$set(this.billData.list,this.billData.index,this.billAddData) // this.$set(this.billData.list,this.billData.index,this.billAddData)
this.$message.success(res.msg) this.$message.success(res.msg)
this.dialogDelivery = false this.dialogDelivery = false;
console.log('更新前',this.billData)
this.$emit('billOfLading', this.billData, 2);
this.$forceUpdate()
} }
}); });
this.$emit('billOfLading', this.billData, 2)
}, },
billSubmit(e, index) { billSubmit(e, index) {
if (e.deliveryStatus == 'PLATENUM_SUCCESS') { if (e.deliveryStatus == 'PLATENUM_SUCCESS') {
@ -275,39 +278,41 @@ export default {
this.dialogBillAdd = true this.dialogBillAdd = true
}, },
// //
billAddSave(e, item) { async billAddSave(e, item) {
if (!e) { if (!e) {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate( async (valid) => {
if (valid) { if (valid) {
this.billAddData.orderId = this.controlWindows.addInfo.id this.billAddData.orderId = this.controlWindows.addInfo.id
this.billAddData.productMeasurement = this.controlWindows.addInfo.productMeasurement this.billAddData.productMeasurement = this.controlWindows.addInfo.productMeasurement
order.billSave(this.billAddData).then(res => { await order.billSave(this.billAddData).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.billAddData.deliveryStatus = 'SUBMITED' this.billAddData.deliveryStatus = 'SUBMITED'
this.billData.list.push(this.billAddData) this.billData.list.push(this.billAddData)
this.billListMeth() this.billListMeth()
this.$message.success(res.msg) this.$message.success(res.msg)
this.dialogBillAdd = false; this.dialogBillAdd = false;
this.$emit('billOfLading', this.billData.orderInfo, 2)
} }
}) })
} }
}) })
} else { } else {
this.$confirm(`确定${e==1?'修改':'锁定'}提货单?`, '提示', { type: 'error' }).then(() => { this.$confirm(`确定${e == 1 ? '修改' : '锁定'}提货单?`, '提示', { type: 'error' }).then( async () => {
// this.billAddData = item ? JSON.parse(JSON.stringify(item)) : {}; // this.billAddData = item ? JSON.parse(JSON.stringify(item)) : {};
this.billAddData.deliveryStatus = e == 2 ? 'PLATENUM_LOCKED' : ''; this.billAddData.deliveryStatus = e == 2 ? 'PLATENUM_LOCKED' : '';
console.log(this.billAddData,'this.billAddData') console.log(this.billAddData, 'this.billAddData')
order.update(this.billAddData).then(res => { await order.update(this.billAddData).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.billListMeth() this.billListMeth()
this.$message.success(res.msg) this.$message.success(res.msg)
this.dialogBillAdd = false; this.dialogBillAdd = false;
this.$emit('billOfLading', this.billData.orderInfo, 2)
} }
}) })
}) })
} };
this.$emit('billOfLading', this.billData.orderInfo, 2) console.log('代码底部');
}, },
// //
billListMeth() { billListMeth() {

@ -363,6 +363,7 @@ export default {
} }
if(!selectIndex||selectIndex==2){ if(!selectIndex||selectIndex==2){
await order.findByOrderId(row.id).then((res) => { await order.findByOrderId(row.id).then((res) => {
console.log('更新',res)
this.billData.orderInfo = Object.assign(res.data,{id:row.id}) this.billData.orderInfo = Object.assign(res.data,{id:row.id})
}); });
} }

Loading…
Cancel
Save