Commit 67100be0 authored by lixy's avatar lixy

选择数据-确认数据

parent 911bdcbf
......@@ -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 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item label="交付方式">
<el-select
filterable
v-model="listQuery.sendType"
placeholder="请选择"
>
<el-option
:key="undefined"
label="全部"
:value="undefined"
></el-option>
<el-option :key="1" label="线上" :value="1"></el-option>
<el-option :key="2" label="线下" :value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="交付方式">-->
<!-- <el-select-->
<!-- filterable-->
<!-- v-model="listQuery.sendType"-->
<!-- placeholder="请选择"-->
<!-- >-->
<!-- <el-option-->
<!-- :key="undefined"-->
<!-- label="全部"-->
<!-- :value="undefined"-->
<!-- ></el-option>-->
<!-- <el-option :key="1" label="线上" :value="1"></el-option>-->
<!-- <el-option :key="2" label="线下" :value="2"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item label="是否定制">
<el-select filterable v-model="listQuery.type" placeholder="请选择">
......@@ -196,7 +196,7 @@
</div>
</div>
</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>
<p>
......@@ -308,9 +308,13 @@
? "待审核"
: 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
? "已完成"
......@@ -339,9 +343,13 @@
{{
item.status == 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
? "已完成"
......@@ -369,10 +377,17 @@
>
<span
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)"
>选择数据</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
class="normal-btn"
style="border: 1px solid #13a8ff; color: #13a8ff"
......@@ -520,6 +535,7 @@ import {
getOrderList,
updatePayStatus,
getCompanyInfoByType,
setDataPrepare
} from "api/website/order/index";
import orderSendDetail from "./orderSendDetail";
import selectDataDialog from "./selectDataDialog";
......@@ -536,9 +552,9 @@ export default {
// {id: 1, name: '创建订单'},
{ id: 2, name: "待付款" },
// {id: 3, name: '已支付'},
{ id: 4, name: "待发货" },
{ id: 5, name: "已收货" },
{ id: 6, name: "已完成" },
{ id: 4, name: "待交付" },
{ id: 5, name: "已交付" },
// { id: 6, name: "已完成" },
// {id: -1, name: '删除'},
{ id: -2, name: "已取消" },
// {id: -3, name: '退款'}
......@@ -623,6 +639,35 @@ export default {
};
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 {
.goods-item {
width: 30%;
height: 100%;
padding-left: 10px;
align-items: center;
.goods-ii {
border-bottom: 1px solid #e6e6e6;
......
<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="flex-aic-jcb">
<div class="invoice-item-text"><label>{{ oneRow.orderEInvoice.titleType == 1 ? "公司名称" : "个人名称" }}{{ oneRow.orderEInvoice.titleName }}</label> </div>
......@@ -55,6 +55,12 @@
</el-row>
</el-form>
</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>
</template>
<script type="javascript">
......@@ -64,6 +70,7 @@
data() {
return {
isVisible: false,
oldeliveryList: [], // 待下载数据列表
}
},
created() {
......@@ -76,9 +83,13 @@
}
},
mounted() {
this.oldeliveryList = this.oneRow.oldeliveryJson
? JSON.parse(this.oneRow.oldeliveryJson)
: [];
this.isVisible = true
},
methods: {
/**
* 弹框-取消
* */
......@@ -106,5 +117,11 @@
margin-top: 10px;
}
}
.down-item {
border: 1px solid #d1e2ff;
background: #fafbfc;
padding: 16px;
margin-bottom: 12px;
}
}
</style>
<template>
<el-dialog title="选择数据" :visible.sync="isVisible" width="600px" class="data-main">
<!-- <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;">
<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">
<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>
</div>
<el-button type="primary" @click="handleChoose(iitem)" slot="reference">搜索</el-button>
<el-button type="primary" v-if="index == list.length - 1" @click="handleAdd()" style="margin-left: 10px;">+</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>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" v-if="!isClick" @click="okSend()">提 交</el-button>
<el-button type="primary" v-else style="opacity: 0.6;" disabled>提 交</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 plain>确 定</el-button>
</div>
</el-dialog>
</template>
<script type="javascript">
import { getItemByType, setOrderItem } from 'api/website/order/index'
import {objDeepCopy} from "../../../utils";
export default {
props: ['oneRow'],
......@@ -32,6 +36,7 @@
loading: false,
list: [{id: 1, dataList: [], name: ''}], // 已选数组
isVisible: false,
orderItemList: [] // 已选数据
}
},
watch: {
......@@ -42,6 +47,7 @@
}
},
mounted() {
this.orderItemList = this.oneRow.orderItemList ? objDeepCopy(this.oneRow.orderItemList) : []
this.isVisible = true
},
methods: {
......@@ -51,6 +57,16 @@
handleAdd(){
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 @@
iitem.showTab = false
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 @@
_this.isClick = false
}, 2000)
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){
if(item.checkedObj){
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