|
@@ -1,7 +1,82 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
- <view class="text-area">
|
|
|
- <text class="title">{{title}}</text>
|
|
|
+ <view class="one">
|
|
|
+ <view class="one_1">
|
|
|
+ <text>
|
|
|
+ <text class="iconfont icon-changshangguanli"></text>
|
|
|
+ {{info.supplier_name}}
|
|
|
+ </text>
|
|
|
+ <text class="status">{{info.zhStatus}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="one_2">
|
|
|
+ <view class="left">
|
|
|
+ <image v-if="info.spec_file" class="image"
|
|
|
+ :src="info.spec_file&&info.spec_file.length>0?info.spec_file[0].url:''" mode="">
|
|
|
+ </image>
|
|
|
+ <image v-else class="image" :src="info.good_file&&info.good_file.length>0?info.good_file[0].url:''"
|
|
|
+ mode="">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view class="right">
|
|
|
+ <view class="name textOver">
|
|
|
+ <text>{{info.zhType||'暂无'}}</text>
|
|
|
+ <text>{{info.good_name||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="spec textOver">
|
|
|
+ <text>规格:{{info.spec_name||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="num">
|
|
|
+ <text>数量:{{info.num||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="money">
|
|
|
+ <text>¥{{info.money||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="two">
|
|
|
+ <view class="two_1">
|
|
|
+ <text>订单号:</text>
|
|
|
+ <text>{{info.order_id||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="two_1">
|
|
|
+ <text>下单时间:</text>
|
|
|
+ <text>{{info.buy_time||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="two_1">
|
|
|
+ <text>采购审批领导:</text>
|
|
|
+ <text>{{info.leader_name||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="two_1">
|
|
|
+ <text>采购审批会计:</text>
|
|
|
+ <text>{{info.accounting_name||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="thr">
|
|
|
+ <view class="thr_1">
|
|
|
+ <text>下单人员:</text>
|
|
|
+ <text>{{info.user_name||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="thr_1">
|
|
|
+ <text>下单角色:</text>
|
|
|
+ <text>{{info.zhRole||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="thr_1">
|
|
|
+ <text>下单人员电话:</text>
|
|
|
+ <text>{{info.user_tel||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="thr_1">
|
|
|
+ <text>收货地址:</text>
|
|
|
+ <text>{{info.address||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="four">
|
|
|
+ <view class="left">
|
|
|
+ <text>商品总价</text>
|
|
|
+ </view>
|
|
|
+ <view class="right">
|
|
|
+ <text>¥{{info.total_money||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -13,6 +88,10 @@
|
|
|
id: '',
|
|
|
user: {},
|
|
|
info: {},
|
|
|
+ // 字典表
|
|
|
+ statusList: [],
|
|
|
+ typeList: [],
|
|
|
+ roleList: []
|
|
|
}
|
|
|
},
|
|
|
onLoad: async function(e) {
|
|
@@ -41,6 +120,9 @@
|
|
|
if (that.id) {
|
|
|
const res = await that.$api(`/OrderDetail/detail/${that.id}`, 'GET', {})
|
|
|
if (res.errcode == '0') {
|
|
|
+ res.data.zhStatus = that.searchDict(res.data.status, 'status')
|
|
|
+ res.data.zhType = that.searchDict(res.data.good_type, 'type')
|
|
|
+ res.data.zhRole = that.searchDict(res.data.user_role, 'role')
|
|
|
that.$set(that, `info`, res.data)
|
|
|
} else {
|
|
|
uni.showToast({
|
|
@@ -49,6 +131,24 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 查询字典表
|
|
|
+ searchDict(e, model) {
|
|
|
+ const that = this;
|
|
|
+ let data
|
|
|
+ if (model == 'status') {
|
|
|
+ data = that.statusList.find((i) => i.value == e);
|
|
|
+ if (data) return data.label
|
|
|
+ else return '暂无'
|
|
|
+ } else if (model == 'type') {
|
|
|
+ data = that.typeList.find((i) => i.value == e);
|
|
|
+ if (data) return data.label
|
|
|
+ else return '暂无'
|
|
|
+ } else {
|
|
|
+ data = that.roleList.find((i) => i.code == e);
|
|
|
+ if (data) return data.name
|
|
|
+ else return '暂无'
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查询其他信息
|
|
|
async searchOther() {
|
|
|
const that = this;
|
|
@@ -59,21 +159,140 @@
|
|
|
is_use: '0',
|
|
|
})
|
|
|
if (res.errcode == '0') that.$set(that, `statusList`, res.data);
|
|
|
+ // 查询类型
|
|
|
+ res = await that.$api(`/DictData`, 'GET', {
|
|
|
+ type: 'goods_type',
|
|
|
+ is_use: '0',
|
|
|
+ })
|
|
|
+ if (res.errcode == '0') that.$set(that, `typeList`, res.data);
|
|
|
+ // 查询角色
|
|
|
+ res = await that.$api(`/Role`, 'GET', {
|
|
|
+ is_use: '0',
|
|
|
+ })
|
|
|
+ if (res.errcode == '0') that.$set(that, `roleList`, res.data);
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style lang="scss">
|
|
|
.content {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- }
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+ background-color: var(--f9Color);
|
|
|
|
|
|
- .text-area {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
+ .one {
|
|
|
+ margin: 2vw 2vw 0 2vw;
|
|
|
+ padding: 0 2vw;
|
|
|
+ border-radius: 10px;
|
|
|
+ background-color: var(--mainColor);
|
|
|
+
|
|
|
+ .one_1 {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 2vw 0;
|
|
|
+ font-size: var(--font16Size);
|
|
|
+ border-bottom: 1px solid var(--f9Color);
|
|
|
+
|
|
|
+ .status {
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ color: var(--fF0Color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .one_2 {
|
|
|
+ display: flex;
|
|
|
+ padding: 2vw 0;
|
|
|
+
|
|
|
+ .left {
|
|
|
+ .image {
|
|
|
+ width: 25vw;
|
|
|
+ height: 25vw;
|
|
|
+ border-radius: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .right {
|
|
|
+ width: 65vw;
|
|
|
+ margin: 0 0 0 2vw;
|
|
|
+
|
|
|
+ .name {
|
|
|
+ padding: 1vw 0 0 0;
|
|
|
+ font-size: var(--font14Size);
|
|
|
+
|
|
|
+ text:first-child {
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ color: var(--mainColor);
|
|
|
+ background-color: var(--f3CColor);
|
|
|
+ border-radius: 5px;
|
|
|
+ padding: 2px 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .spec {
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ }
|
|
|
+
|
|
|
+ .num {
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ color: var(--f85Color);
|
|
|
+ }
|
|
|
+
|
|
|
+ .money {
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .two {
|
|
|
+ margin: 2vw 2vw 0 2vw;
|
|
|
+ padding: 2vw;
|
|
|
+ border-radius: 10px;
|
|
|
+ background-color: var(--mainColor);
|
|
|
+
|
|
|
+ .two_1 {
|
|
|
+ padding: 2vw 0;
|
|
|
+ font-size: var(--font14Size);
|
|
|
+
|
|
|
+ text:first-child {
|
|
|
+ color: var(--f85Color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .thr {
|
|
|
+ margin: 2vw 2vw 0 2vw;
|
|
|
+ padding: 0 2vw;
|
|
|
+ border-radius: 10px;
|
|
|
+ background-color: var(--mainColor);
|
|
|
+
|
|
|
+ .thr_1 {
|
|
|
+ padding: 2vw 0;
|
|
|
+ font-size: var(--font14Size);
|
|
|
+
|
|
|
+ text:first-child {
|
|
|
+ color: var(--f85Color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .four {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin: 2vw 2vw 0 2vw;
|
|
|
+ padding: 2vw;
|
|
|
+ border-radius: 10px;
|
|
|
+ background-color: var(--mainColor);
|
|
|
+ font-size: var(--font14Size);
|
|
|
+
|
|
|
+ .left {
|
|
|
+ color: var(--f85Color);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|