|
@@ -1,44 +1,42 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="order-detail">
|
|
<div class="order-detail">
|
|
|
- <el-drawer :visible.sync="showOrderDetail" size="1000px" :before-close="closeFn" custom-class="order-draw-wrap" direction="ltr" @close="closeTrigger">
|
|
|
|
|
- <div class="order-manage-wrap" v-if="!$util.isEmpty(data)">
|
|
|
|
|
- <div class="card-wrap" style="margin-top:0px;">
|
|
|
|
|
- <div class="card-tit">备注</div>
|
|
|
|
|
- <div class="card-body">
|
|
|
|
|
- <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="data[0].remark"></el-input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="text-align:center;margin-top:4px;">
|
|
|
|
|
- <el-button @click.stop="modifyRemark()" size="small" type="primary" style="margin:0 auto;">修改</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-drawer :visible.sync="showOrderDetail" size="850px" :before-close="closeFn" custom-class="order-draw-wrap" direction="ltr" @close="closeTrigger">
|
|
|
|
|
+ <div class="order-manage-wrap" v-if="!$util.isEmpty(customList)">
|
|
|
<div class="card-wrap">
|
|
<div class="card-wrap">
|
|
|
- <div class="card-tit">花材信息</div>
|
|
|
|
|
|
|
+ <div class="card-tit">
|
|
|
|
|
+ 预订客户
|
|
|
|
|
+ <el-button type="primary" @click="addCustom()" style="margin-left:620px;">添加客户</el-button>
|
|
|
|
|
+ </div>
|
|
|
<div class="card-body">
|
|
<div class="card-body">
|
|
|
- <el-table :data="data[0].product">
|
|
|
|
|
- <el-table-column label="图片">
|
|
|
|
|
|
|
+ <el-table :data="customList">
|
|
|
|
|
+ <el-table-column property="customId" label="客户ID"></el-table-column>
|
|
|
|
|
+ <el-table-column property="customName" label="客户名称"></el-table-column>
|
|
|
|
|
+ <el-table-column label="数量">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <cl-avatar shape="square" :size="30" :src="scope.row.cover"></cl-avatar>
|
|
|
|
|
|
|
+ <el-input v-model="scope.row.num" placeholder="数量" @focus="scope.row.num=''" style="width:80px;"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column property="name" label="名称"></el-table-column>
|
|
|
|
|
- <el-table-column property="xhUnitPrice" label="单价"></el-table-column>
|
|
|
|
|
- <el-table-column label="数量">
|
|
|
|
|
|
|
+ <el-table-column label="单价">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span style="cursor:pointer;" @click="getStockDetail(scope.row)">
|
|
|
|
|
- <i class="el-icon-s-order" style="color:#409eff;font-size:17px;" slot="reference"></i>
|
|
|
|
|
- {{ scope.row.num?parseFloat(scope.row.num):0 }}
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <el-input v-model="scope.row.unitPrice" placeholder="单价" @focus="scope.row.unitPrice=''" style="width:90px;"></el-input>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column property="refundNum" label="已退数"></el-table-column>
|
|
|
|
|
- <el-table-column label="备注">
|
|
|
|
|
|
|
+ <el-table-column label="合计">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span @click="modifyItemRemark(scope.row)" style="cursor: pointer;"><i class="el-icon-edit" style="color:#409eff;font-size:17px;cursor:pointer;" slot="reference"></i>{{ scope.row.remark }}</span>
|
|
|
|
|
|
|
+ ¥{{ parseFloat((scope.row.num * scope.row.unitPrice).toFixed(2)) }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div style="margin-left:210px;margin-top:30px;">
|
|
|
|
|
+ <el-button @click="closeFn">取消</el-button>
|
|
|
|
|
+ <el-popconfirm title="确认保存?" @confirm="savePrice()" @onConfirm="savePrice()" style="margin-left:220px;">
|
|
|
|
|
+ <el-button type="primary" slot="reference">保存</el-button>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else v-loading="loading" style="height:800px;"></div>
|
|
<div v-else v-loading="loading" style="height:800px;"></div>
|
|
|
</el-drawer>
|
|
</el-drawer>
|
|
@@ -56,36 +54,25 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
showOrderDetail: false,
|
|
showOrderDetail: false,
|
|
|
- data: [],
|
|
|
|
|
|
|
+ customList: [],
|
|
|
|
|
+ info:{},
|
|
|
loading:true
|
|
loading:true
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ addCustom(){
|
|
|
|
|
+ this.$emit('addNewCustom',this.orderOperate)
|
|
|
|
|
+ },
|
|
|
closeTrigger(){
|
|
closeTrigger(){
|
|
|
this.$emit('searchFocus')
|
|
this.$emit('searchFocus')
|
|
|
},
|
|
},
|
|
|
- getStockDetail(info){
|
|
|
|
|
- this.$emit('getStockDetail',info)
|
|
|
|
|
- },
|
|
|
|
|
- modifyItemRemark(info){
|
|
|
|
|
- this.$prompt('请输入备注','提示',{confirmButtonText:'确定',cancelButtonText:'取消',inputPattern:/\S/,inputErrorMessage:'请写备注',inputValue:info.remark}).then(({value}) => {
|
|
|
|
|
- this.$service.orderItem.updateItemRemark({ remark: value,id:info.id}).then(data => {
|
|
|
|
|
- info.remark = value
|
|
|
|
|
- this.$message.success('修改成功')
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- modifyRemark(){
|
|
|
|
|
- this.$service.order.modifyRemark({ id: this.orderOperate.id,remark:this.data[0].remark }).then(res => {
|
|
|
|
|
- this.$message.success('修改成功')
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
init() {
|
|
init() {
|
|
|
this.data = []
|
|
this.data = []
|
|
|
this.showOrderDetail = true
|
|
this.showOrderDetail = true
|
|
|
- this.$service.order.info({ id: this.orderOperate.id }).then(res => {
|
|
|
|
|
- this.data = [res]
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$service.liveOrder.getDetail({ id: this.orderOperate.id }).then(res => {
|
|
|
|
|
+ this.customList = res.customList
|
|
|
|
|
+ this.info = res.info
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
closeFn() {
|
|
closeFn() {
|
|
|
this.showOrderDetail = false;
|
|
this.showOrderDetail = false;
|