完善订单列表功能

This commit is contained in:
TOP糯米 2023-03-16 22:29:04 +08:00
parent 8b0a19c458
commit 719ae35b5f
5 changed files with 93 additions and 40 deletions

View File

@ -6,14 +6,27 @@
</block>
<block v-if="order.state == 2">
<view class="btn active" @click.stop="confirmPrice">
<text>尾款确认</text>
<text>确认完成</text>
</view>
</block>
<block v-if="order.state == 4">
<view class="btn normal">待用户支付尾款</view>
</block>
<block v-if="order.state == 5">
<view class="btn normal">待用户确认</view>
</block>
<block v-if="order.state == 6">
<view class="btn normal">已完成</view>
</block>
</block>
<block v-if="order.listType == 't3'">
<block v-if="order.state == 2">
<view class="btn normal">待用户确认</view>
</block>
<block v-if="order.state == 3">
<view class="btn normal">已完成</view>
</block>
</block>
<block v-if="order.listType == 't3'"> </block>
</view>
</template>

View File

@ -14,7 +14,7 @@
<text class="text">1)添加后请客户在小程序订单中支付尾款</text>
<text class="text">2)没有尾款的话请直接点击确认提交</text>
</view>
<view class="btn" @click="confirmPrice">确认添加</view>
<view class="btn" @click="confirmPrice">确认</view>
</view>
</widget-modal>
</view>

View File

@ -20,6 +20,7 @@
<text class="title">订单编号</text>
<text class="text">{{ order.orderId }}</text>
</view>
<block v-if="order.listType != 't3'">
<view class="order-desc-row">
<text class="title">服务分类</text>
<text class="text">{{ order.cate }}</text>
@ -28,6 +29,7 @@
<text class="title">需求内容</text>
<text class="text">{{ order.content }}</text>
</view>
</block>
<view class="order-desc-row">
<text class="title">下单时间</text>
<text class="text">{{ order.createTime }}</text>

View File

@ -10,6 +10,7 @@ export default {
prototype.$request(options.request).then(response => {
if (response.code == 1) {
let list = [];
if (options.listType == "t1" || options.listType == "t2") {
response.data.forEach(item => {
list.push({
listType: options.listType,
@ -25,6 +26,24 @@ export default {
price: item.money,
});
});
} else if (options.listType == "t3") {
response.data.forEach(item => {
list.push({
listType: options.listType,
id: item.id,
orderId: item.order,
username: "用户名称",
cate: "待返数据",
content: "",
createTime: item.times,
serviceTime: item.starttime,
orderType: 1,
state: item.status,
price: item.money,
});
});
}
return resolve(list);
}
return reject(response.msg);

View File

@ -21,6 +21,8 @@ export default {
prototype.$request(options.request).then(response => {
if (response.code == 1) {
let list = [];
if (options.listType == "t1" || options.listType == "t2") {
response.data.forEach(item => {
list.push({
listType: options.listType,
@ -36,6 +38,23 @@ export default {
price: item.money,
});
});
} else if (options.listType == "t3") {
response.data.forEach(item => {
list.push({
listType: options.listType,
id: item.id,
orderId: item.order,
username: "用户名称",
cate: "待返数据",
content: "",
createTime: item.times,
serviceTime: item.starttime,
orderType: 1,
state: item.status,
price: item.money,
});
});
}
return resolve(list);
}
return reject(response.msg);
@ -62,7 +81,7 @@ export default {
return new Promise((resolve, reject) => {
prototype.$request(options.request).then(response => {
if (response.code == 1) {
return resolve(response.data);
return resolve(response);
}
return reject(response.msg);
}).catch(e => { });