Commit 67100be0 authored by lixy's avatar lixy

选择数据-确认数据

parent 911bdcbf
...@@ -57,6 +57,17 @@ export function setOrderItem(obj) { ...@@ -57,6 +57,17 @@ export function setOrderItem(obj) {
}); });
} }
/**
* 定制数据交付
*/
export function setDataPrepare(obj) {
return fetch({
url: '/api/website/orderInfo/setDataPrepare',
method: 'post',
data: obj
});
}
/** /**
* 选择定制数据 * 选择定制数据
*/ */
......
...@@ -58,23 +58,23 @@ ...@@ -58,23 +58,23 @@
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="8"> <!-- <el-col :span="8">-->
<el-form-item label="交付方式"> <!-- <el-form-item label="交付方式">-->
<el-select <!-- <el-select-->
filterable <!-- filterable-->
v-model="listQuery.sendType" <!-- v-model="listQuery.sendType"-->
placeholder="请选择" <!-- placeholder="请选择"-->
> <!-- >-->
<el-option <!-- <el-option-->
:key="undefined" <!-- :key="undefined"-->
label="全部" <!-- label="全部"-->
:value="undefined" <!-- :value="undefined"-->
></el-option> <!-- ></el-option>-->
<el-option :key="1" label="线上" :value="1"></el-option> <!-- <el-option :key="1" label="线上" :value="1"></el-option>-->
<el-option :key="2" label="线下" :value="2"></el-option> <!-- <el-option :key="2" label="线下" :value="2"></el-option>-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否定制"> <el-form-item label="是否定制">
<el-select filterable v-model="listQuery.type" placeholder="请选择"> <el-select filterable v-model="listQuery.type" placeholder="请选择">
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
</div> </div>
</div> </div>
</td> </td>
<td class="goods-item" v-if="item.type == 2"> <td class="goods-item" style="padding-left:10px;" v-if="item.type == 2">
<div class="flex-aic-jcb"> <div class="flex-aic-jcb">
<div> <div>
<p> <p>
...@@ -308,9 +308,13 @@ ...@@ -308,9 +308,13 @@
? "待审核" ? "待审核"
: item.status == 2 && item.payImg && item.auditStatus == 2 : item.status == 2 && item.payImg && item.auditStatus == 2
? "已拒绝" ? "已拒绝"
: item.status == 4 : item.status == 4 && item.sendType == 1
? "待交付"
: item.status == 4 && item.sendType == 2
? "待发货" ? "待发货"
: item.status == 5 : item.status == 5 && item.sendType == 1
? "已交付"
: item.status == 5 && item.sendType == 2
? "待收货" ? "待收货"
: item.status == 6 : item.status == 6
? "已完成" ? "已完成"
...@@ -337,19 +341,23 @@ ...@@ -337,19 +341,23 @@
" "
> >
{{ {{
item.status == 2 item.status == 2
? "待付款" ? "待付款"
: item.status == 4 : item.status == 4 && item.sendType == 1
? "待发货" ? "待交付"
: item.status == 5 : item.status == 4 && item.sendType == 2
? "待收货" ? "待发货"
: item.status == 6 : item.status == 5 && item.sendType == 1
? "已完成" ? "已交付"
: item.status == -2 : item.status == 5 && item.sendType == 2
? "已取消" ? "待收货"
: item.status == -1 : item.status == 6
? "已删除" ? "已完成"
: item.status : item.status == -2
? "已取消"
: item.status == -1
? "已删除"
: item.status
}} }}
</td> </td>
<td style="padding: 20px; border-right: none"> <td style="padding: 20px; border-right: none">
...@@ -369,10 +377,17 @@ ...@@ -369,10 +377,17 @@
> >
<span <span
class="normal-btn" class="normal-btn"
v-if="item.status == 4 && item.type == 2" v-if="item.status == 4 && item.type == 2 && item.dataPrepare == 0"
@click="handleData(item)" @click="handleData(item)"
>选择数据</span >选择数据</span
> >
<span
class="normal-btn"
v-if="item.dataPrepare == 0 && item.orderItemList && item.orderItemList.length>0"
style="border: 1px solid #13a8ff; color: #13a8ff"
@click="okHandleSend(item)"
>确认数据</span
>
<span <span
class="normal-btn" class="normal-btn"
style="border: 1px solid #13a8ff; color: #13a8ff" style="border: 1px solid #13a8ff; color: #13a8ff"
...@@ -520,6 +535,7 @@ import { ...@@ -520,6 +535,7 @@ import {
getOrderList, getOrderList,
updatePayStatus, updatePayStatus,
getCompanyInfoByType, getCompanyInfoByType,
setDataPrepare
} from "api/website/order/index"; } from "api/website/order/index";
import orderSendDetail from "./orderSendDetail"; import orderSendDetail from "./orderSendDetail";
import selectDataDialog from "./selectDataDialog"; import selectDataDialog from "./selectDataDialog";
...@@ -536,9 +552,9 @@ export default { ...@@ -536,9 +552,9 @@ export default {
// {id: 1, name: '创建订单'}, // {id: 1, name: '创建订单'},
{ id: 2, name: "待付款" }, { id: 2, name: "待付款" },
// {id: 3, name: '已支付'}, // {id: 3, name: '已支付'},
{ id: 4, name: "待发货" }, { id: 4, name: "待交付" },
{ id: 5, name: "已收货" }, { id: 5, name: "已交付" },
{ id: 6, name: "已完成" }, // { id: 6, name: "已完成" },
// {id: -1, name: '删除'}, // {id: -1, name: '删除'},
{ id: -2, name: "已取消" }, { id: -2, name: "已取消" },
// {id: -3, name: '退款'} // {id: -3, name: '退款'}
...@@ -623,6 +639,35 @@ export default { ...@@ -623,6 +639,35 @@ export default {
}; };
this.auditVisible = true; this.auditVisible = true;
}, },
/**
* 交付已选数据
*/
okHandleSend(item){
this.$confirm("此操作确认后不可修改, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
setDataPrepare({orderId: item.orderId,}).then((response) => {
if(response.status == 200){
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000
});
this.getList()
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
})
}
});
}).catch(()=>{})
},
/** /**
* 检测填写状态 * 检测填写状态
*/ */
...@@ -904,7 +949,6 @@ export default { ...@@ -904,7 +949,6 @@ export default {
.goods-item { .goods-item {
width: 30%; width: 30%;
height: 100%; height: 100%;
padding-left: 10px;
align-items: center; align-items: center;
.goods-ii { .goods-ii {
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
......
<template> <template>
<el-dialog title="发货详情" :visible.sync="isVisible" class="send-main"> <el-dialog title="查看详情" :visible.sync="isVisible" class="send-main">
<div class="invoice-item" v-if="oneRow.orderEInvoice && oneRow.invoiceStatus >= 3"> <div class="invoice-item" v-if="oneRow.orderEInvoice && oneRow.invoiceStatus >= 3">
<div class="flex-aic-jcb"> <div class="flex-aic-jcb">
<div class="invoice-item-text"><label>{{ oneRow.orderEInvoice.titleType == 1 ? "公司名称" : "个人名称" }}{{ oneRow.orderEInvoice.titleName }}</label> </div> <div class="invoice-item-text"><label>{{ oneRow.orderEInvoice.titleType == 1 ? "公司名称" : "个人名称" }}{{ oneRow.orderEInvoice.titleName }}</label> </div>
...@@ -55,6 +55,12 @@ ...@@ -55,6 +55,12 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div
class="flex-aic-jcb down-item"
v-for="item in oldeliveryList"
>
<label style="font-size: 12px; color: #43425d">{{ item.name }}</label>
</div>
</el-dialog> </el-dialog>
</template> </template>
<script type="javascript"> <script type="javascript">
...@@ -64,6 +70,7 @@ ...@@ -64,6 +70,7 @@
data() { data() {
return { return {
isVisible: false, isVisible: false,
oldeliveryList: [], // 待下载数据列表
} }
}, },
created() { created() {
...@@ -76,9 +83,13 @@ ...@@ -76,9 +83,13 @@
} }
}, },
mounted() { mounted() {
this.oldeliveryList = this.oneRow.oldeliveryJson
? JSON.parse(this.oneRow.oldeliveryJson)
: [];
this.isVisible = true this.isVisible = true
}, },
methods: { methods: {
/** /**
* 弹框-取消 * 弹框-取消
* */ * */
...@@ -106,5 +117,11 @@ ...@@ -106,5 +117,11 @@
margin-top: 10px; margin-top: 10px;
} }
} }
.down-item {
border: 1px solid #d1e2ff;
background: #fafbfc;
padding: 16px;
margin-bottom: 12px;
}
} }
</style> </style>
<template> <template>
<el-dialog title="选择数据" :visible.sync="isVisible" width="600px" class="data-main"> <el-dialog title="选择数据" :visible.sync="isVisible" width="600px" class="data-main">
<!-- <el-button type="primary" @click="jumpUrl()">新 增</el-button>--> <!-- <el-button type="primary" @click="jumpUrl()">新 增</el-button>-->
<div class="flex-aic" v-for="(iitem, index) in orderItemList" style="position:relative;margin-bottom: 10px;">
<el-input v-model="iitem.name" style="width: 60%;margin-right:10px;" disabled></el-input>
<el-button type="danger" @click="handleOrderDelete(index)" slot="reference" size="small">删除</el-button>
</div>
<div class="flex-aic" v-for="(iitem, index) in list" style="position:relative;margin-bottom: 10px;"> <div class="flex-aic" v-for="(iitem, index) in list" style="position:relative;margin-bottom: 10px;">
<el-input v-model="iitem.name" placeholder="请输入关键字" style="width: 60%;margin-right:10px;"></el-input> <el-input v-model="iitem.name" @blur="checkItem(iitem)" placeholder="请输入关键字" style="width: 60%;margin-right:10px;"></el-input>
<div class="ab-main" v-if="iitem.showTab"> <div class="ab-main" v-if="iitem.showTab">
<p v-for="item in iitem.dataList" @click="chooseItem(iitem, item)">{{item.name}}</p> <p v-for="item in iitem.dataList" @click="chooseItem(iitem, item)">{{item.name}}</p>
<p v-if="iitem.dataList.length<=0" @click="chooseItem(iitem)">无匹配内容</p> <p v-if="iitem.dataList.length<=0" @click="chooseItem(iitem)">无匹配内容</p>
</div> </div>
<el-button type="primary" @click="handleChoose(iitem)" slot="reference">搜索</el-button> <el-button type="primary" @click="handleChoose(iitem)" slot="reference"size="small">搜索</el-button>
<el-button type="danger" @click="handleDelete(index)" slot="reference" size="small">删除</el-button>
<el-button type="primary" v-if="index == list.length - 1" @click="handleAdd()" size="small">+</el-button>
<el-button type="primary" v-if="index == list.length - 1" @click="handleAdd()" style="margin-left: 10px;">+</el-button>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
<el-button type="primary" v-if="!isClick" @click="okSend()">提 交</el-button> <el-button type="primary" plain v-if="!isClick" @click="okSend()">确 定</el-button>
<el-button type="primary" v-else style="opacity: 0.6;" disabled>提 交</el-button> <el-button type="primary" v-else style="opacity: 0.6;" disabled plain>确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script type="javascript"> <script type="javascript">
import { getItemByType, setOrderItem } from 'api/website/order/index' import { getItemByType, setOrderItem } from 'api/website/order/index'
import {objDeepCopy} from "../../../utils";
export default { export default {
props: ['oneRow'], props: ['oneRow'],
...@@ -32,6 +36,7 @@ ...@@ -32,6 +36,7 @@
loading: false, loading: false,
list: [{id: 1, dataList: [], name: ''}], // 已选数组 list: [{id: 1, dataList: [], name: ''}], // 已选数组
isVisible: false, isVisible: false,
orderItemList: [] // 已选数据
} }
}, },
watch: { watch: {
...@@ -42,6 +47,7 @@ ...@@ -42,6 +47,7 @@
} }
}, },
mounted() { mounted() {
this.orderItemList = this.oneRow.orderItemList ? objDeepCopy(this.oneRow.orderItemList) : []
this.isVisible = true this.isVisible = true
}, },
methods: { methods: {
...@@ -51,6 +57,16 @@ ...@@ -51,6 +57,16 @@
handleAdd(){ handleAdd(){
this.list.push({id: this.list.length+1, dataList: [], name: ''}) this.list.push({id: this.list.length+1, dataList: [], name: ''})
}, },
/**
* 检测是否有数据
*/
checkItem(item){
if(!item.name){ // 清空输入
item.checkedObj = undefined
item.name = ''
}
this.$forceUpdate()
},
/** /**
* 选择数据 * 选择数据
*/ */
...@@ -65,6 +81,24 @@ ...@@ -65,6 +81,24 @@
iitem.showTab = false iitem.showTab = false
this.$forceUpdate() this.$forceUpdate()
}, },
/**
* 删除已保存数据
*/
handleOrderDelete(index){
this.orderItemList.splice(index, 1)
this.$forceUpdate()
},
/**
* 删除已选数据
*/
handleDelete(index){
if(this.list.length==1){
this.list = [{id: 1, dataList: [], name: ''}] // 已选数组
} else {
this.list.splice(index, 1)
}
this.$forceUpdate()
},
/** /**
* 搜索 * 搜索
*/ */
...@@ -127,6 +161,13 @@ ...@@ -127,6 +161,13 @@
_this.isClick = false _this.isClick = false
}, 2000) }, 2000)
let itemInfoDtoList = [] let itemInfoDtoList = []
this.orderItemList.map(function(item){
let p = {
id: item.detailId,
type: item.type // 类型 1、标准数据,2、影像图库,3、行业应用信息,
}
itemInfoDtoList.push(p)
})
this.list.map(function(item){ this.list.map(function(item){
if(item.checkedObj){ if(item.checkedObj){
let p = { let p = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment