Commit 55bd3b93 authored by rencs's avatar rencs

Merge branch 'dev_ren' into 'master'

Dev ren

See merge request !4
parents 450a3d4e b0ae5fb0
......@@ -8,3 +8,12 @@ export function getCustomList(obj) {
params: obj
});
}
// 定制转订单
export function createOrder(obj) {
return fetch({
url: '/api/website/orderInfo/customerToOrderInfo',
method: 'post',
data: obj
});
}
......@@ -65,18 +65,19 @@
<span>{{ item.descr }}</span>
</div>
</div>
<div class="itemMiddle" v-if="item.status == 1">待处理</div>
<div class="itemMiddle" v-if="item.status == 2">已生成订单</div>
<div class="itemMiddle" v-if="item.auditStatus == 1">待处理</div>
<div class="itemMiddle" v-if="item.auditStatus == 2">已生成订单</div>
<div class="itemMiddle" v-if="item.auditStatus == 3">已拒绝</div>
<div
class="itemRight"
v-if="item.status == 1"
@click="CreateOrder(item)"
v-if="item.auditStatus == 1"
@click="checkInfo(item)"
>
生产订单
审核
</div>
<div
class="itemRight"
v-if="item.status == 2"
v-if="item.auditStatus == 2"
@click="toItemOrder(item)"
>
查看订单
......@@ -95,22 +96,110 @@
:total="total"
>
</el-pagination>
<el-dialog
title="定制数据审核"
:visible.sync="showCheckInfo"
width="30%"
@close="showCheckInfo = false"
>
<div class="orderItem">
<div class="itemTop">提交时间:{{ checkItem.crtTimeStr }}</div>
<div class="itemContent2">
<div class="itemLeft">
<div class="itemInfo2">
<div>
<p>
区域范围:{{
checkItem.provinceName +
checkItem.cityName +
checkItem.areaName
}}
</p>
<p>
采禁时间:{{ checkItem.startTimeStr }}{{
checkItem.endTimeStr
}}
</p>
<p v-if="checkItem.type == 1">
分辨率:{{ checkItem.resolution }}
</p>
</div>
<div v-if="checkItem.type != 3">
<p v-if="checkItem.type != 3">
获取类型:
<span v-if="checkItem.gainType == 101">数据API</span>
<span v-if="checkItem.gainType == 102">实体数据</span>
<span v-if="checkItem.gainType == 201">报告</span>
<span v-if="checkItem.gainType == 202">web平台</span>
<span v-if="checkItem.gainType == 203">其他</span>
</p>
<p v-if="checkItem.type == 2">
申请人:{{ checkItem.contactUser }}
</p>
<p v-if="checkItem.type == 2">
联系方式:{{ checkItem.contactPhone }}
</p>
</div>
<div v-if="checkItem.type == 3">
<p>定制类型:{{ checkItem.dataType }}</p>
<p>数据格式:{{ checkItem.dataFormat }}</p>
</div>
</div>
<div class="itemDesc" v-if="checkItem.type != 3">
<span>需求描述:</span>
<span>{{ checkItem.descr }}</span>
</div>
<div class="itemDesc">
<p>
审核结果:<el-radio-group v-model="isPass">
<el-radio :label="2">通过</el-radio>
<el-radio :label="3">不通过</el-radio>
</el-radio-group>
</p>
<p v-if="isPass == 2">
数据价格:
<el-input-number
v-model="price"
:min="0"
:step="0.1"
:precision="1"
style="width: 50%"
></el-input-number>
</p>
<p v-if="isPass == 3">
拒绝原因:
<el-input v-model="reason" style="width: 50%"></el-input>
</p>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="showCheckInfo = false">取 消</el-button>
<el-button type="primary" @click="CreateOrder">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getCustomList } from "api/website/order/index";
import { getCustomList, createOrder } from "api/website/order/index";
import { timestamp2DateAuto } from "../../../utils/dateUtils";
export default {
data() {
return {
tableData: [],
total: 0,
isPass: 2,
checkItem: {},
listQuery: {
page: 1,
limit: 5,
type: "",
status: "",
},
price: 0,
reason: "",
showCheckInfo: false,
};
},
created() {
......@@ -118,12 +207,80 @@ export default {
},
mounted() {},
methods: {
CreateOrder(item) {
checkInfo(item) {
this.checkItem = item;
this.showCheckInfo = true;
console.log(item);
},
CreateOrder() {
let item = this.checkItem;
let text = "";
if (this.isPass == 2) {
text = "确认通过?";
} else {
text = "确认拒绝?";
}
this.$confirm(text, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
createOrder({
customId: item.id,
auditStatus: this.isPass,
auditReason: this.reason,
amount: this.price,
}).then((res) => {
if (res.status == 200) {
this.$message.success("操作成功");
this.showCheckInfo = false;
this.getList();
} else {
this.$message.warning(res.message);
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
toItemOrder(item) {
console.log(item);
},
delItemOrder(item) {
this.$confirm("确认删除", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
return;
createOrder({
customId: item.id,
auditStatus: this.isPass,
auditReason: this.reason,
amount: this.price,
}).then((res) => {
if (res.status == 200) {
this.$message.success("操作成功");
this.showCheckInfo = false;
this.getList();
} else {
this.$message.warning(res.message);
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
search() {
this.getList();
},
......@@ -199,6 +356,11 @@ export default {
align-items: center;
height: 140px;
}
.itemContent2 {
width: 100%;
display: flex;
align-items: center;
}
.itemContent > div {
height: 100%;
}
......@@ -206,6 +368,12 @@ export default {
flex: 1;
box-sizing: border-box;
padding: 16px;
.itemInfo2 {
display: flex;
width: 100%;
height: 90%;
flex-direction: column;
}
.itemInfo {
display: flex;
width: 100%;
......
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