提交 096e3f4a authored 作者: 赵明's avatar 赵明

提交代码

上级 25cf68a2
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/b2b-applet-taizhou.iml" filepath="$PROJECT_DIR$/.idea/b2b-applet-taizhou.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -5,6 +5,21 @@ import {
* params 参数 <object>
*config 配置项 <object> 可传 {header: {}, custom: {load: false}}
*/
//图片
export const downloadFileById = (id, config = {}) => {
return new Promise((resolve, reject) => {
http.get('/api/file/file/findListByIds/'+id, {
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
//平台切换
......@@ -521,7 +536,218 @@ export const getBuyerList = (params, config = {}) => {
})
})
}
// 集采列表
export const getSchedule = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post('/api/business/centralizedPurchasingSchedule/list', {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 集采保证金列表
export const getCentralizedPurchasingRegisterList = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post('/api/business/centralizedPurchasingRegister/list', {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
export const centralizedPurchasingSchedule = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.get(`/api/business/centralizedPurchasingSchedule/getOne/${params.id}`, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 集采保证金详情
export const centralizedPurchasingRegister = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.get(`/api/business/centralizedPurchasingRegister/getOne/${params.id}`, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 集采保证金审核
export const centralizedPurchasingRegisterAudit = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post('/api/business/centralizedPurchasingRegister/audit', {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 集采转销售
export const centralizedPurchasingRegisterSales = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post('/api/business/centralizedPurchasingSchedule/sales', {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 集采上架下架
export const scheduleUpdateStatus = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.get(`/api/business/centralizedPurchasingSchedule/updateStatus/${params.id}/${params.value}`, {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 集采按id删除
export const scheduleDelete = (id, config = {}) => {
return new Promise((resolve, reject) => {
http.get(`/api/business/centralizedPurchasingSchedule/delete/${id}`, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 竞价专场分页
export const auctionSpecialPage = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post('/api/business/auctionSpecial/page', {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 新增竞价专场
export const auctionSpecialUpdateStatus = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.get(`/api/business/auctionSpecial/updateStatus/${params.id}/${params.value}`, {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 查询竞价专场/{id}
export const auctionSpecialGet = (id, config = {}) => {
return new Promise((resolve, reject) => {
http.get(`/api/business/auctionSpecial/get/${id}`, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 查询竞价专场/{id}
export const findAuctionMarginInfo = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post(`/api/business/auction/findAuctionMarginInfo?businessId=${params.businessId}&businessTypes=${params.businessTypes}&page=${params.page}&rows=${params.rows}`, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
export const pageAudit = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post(`/api/business/auction/pageAudit?specialId=${params.specialId}&page=${params.page}&rows=${params.rows}`, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 买家保证金审核
export const auditBuyerMarginInfo = (params, config = {}) => {
return new Promise((resolve, reject) => {
http.post(`/api/business/auction/auditAuctionMarginInfo`, {
...params
}, {
...config
})
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
}
// 购物车提交订单
export const generateOrder = (params, config = {}) => {
return new Promise((resolve, reject) => {
......
......@@ -2,7 +2,7 @@
* 接口参数
*/
const serverConfig = {
baseURL: "http://116.148.227.177:8760",
baseURL: "http://test.supew.com/",
// baseURL: "http://www.supew.com/",
/* 根域名 */
// baseURL: "http://114.67.111.37:8001", /* 根域名 */
......
......@@ -55,6 +55,8 @@
"index.account-current": "Current account",
"index.platform-switch-confirm": "Confirm switch",
"index.schedule": "Centralized purchase plan",
"index.contact": "Contact",
"index.telephone": "Telephone",
"index.warehouse-detail": "Warehouse detailed address",
......
......@@ -53,6 +53,8 @@
"index.account-current": "当前账号",
"index.platform-switch-confirm": "确认切换",
"index.schedule": "集采计划",
"index.contact": "联系人",
"index.telephone": "联系电话",
......
{
"pages": [{
"pages": [
{
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "%index.home%",
......@@ -19,6 +20,13 @@
"padding-bottom": 0
}
},
{
"path": "pages/schedule/index",
"style": {
"navigationBarTitleText": "%index.schedule%",
"enablePullDownRefresh": true
}
},
{
"path": "pages/sort/index",
"style": {
......@@ -206,13 +214,15 @@
"style": {
"navigationBarTitleText": "%index.privacy-policy%"
}
}, {
},
{
"path": "pages/mine/changePlat",
"style": {
"navigationBarTitleText": "%index.platform-switch%",
"enablePullDownRefresh": false
}
}, {
},
{
"path": "pages/carrier/index",
"style": {
"navigationBarTitleText": "%index.select-carrier%",
......@@ -257,11 +267,59 @@
}
},
{
"path" : "pages/web/web",
"style" :
"path": "pages/web/web",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/marginManagement/index",
"style": {
"navigationBarTitleText": " 集采保证金审核",
"enablePullDownRefresh": true
}
},
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
"path": "pages/marginDetail/schedule-edit",
"style": {
"navigationBarTitleText": " 集采计划详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/marginDetail/index",
"style": {
"navigationBarTitleText": " 集采保证金详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/turnOrder/index",
"style": {
"navigationBarTitleText": " 集采转订单",
"enablePullDownRefresh": true
}
},
{
"path": "pages/auctionSpecial/index",
"style": {
"navigationBarTitleText": "竞拍专场",
"enablePullDownRefresh": true
}
},
{
"path": "pages/verify/buyer",
"style": {
"navigationBarTitleText": "竞拍专场买家保证金审核",
"enablePullDownRefresh": true
}
},
{
"path": "pages/verify/seller",
"style": {
"navigationBarTitleText": "店铺竞拍商品审核 ",
"enablePullDownRefresh": true
}
}
],
......@@ -279,7 +337,8 @@
"selectedColor": "#B60001",
"borderStyle": "white",
"backgroundColor": "#FFFFFF",
"list": [{
"list": [
{
"pagePath": "pages/home/index",
"text": "%index.home%",
"iconPath": "static/tabbar/home.png",
......@@ -299,12 +358,19 @@
}
]
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "", //模式名称
"path": "", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}]
"condition": {
//模式配置,仅开发期间生效
"current": 0,
//当前激活的模式(list 的索引项)
"list": [
{
"name": "",
//模式名称
"path": "",
//启动页面,必选
"query": ""
//启动参数,在页面的onLoad函数里面得到
}
]
}
}
<template>
<view class="container">
<block>
<view class="serch-box">
<view class="condition-box">
<view class="search-box">
<image :src="icon" class="icon"></image>
<input class="uni-input" v-model="query.name" confirm-type="search"
:placeholder="$t('index.enter')+'专场名称'" @keyup.enter.native="onSearch" placeholder-style="color:#B9B9B9" />
</view>
<view class="btn-box">
<button class="btn" @click="onSearch">搜索</button>
</view>
</view>
</view>
</block>
<view class="list-box" v-for="(item, index) in list" :key="item.orderNum">
<view class="content-detail">
<view class="left">
<view class="lable">专场名称:<text class="value">{{item.name}}</text>
</view>
<view class="lable">专场开始时间:<text
class="value">{{item.specialStartTime || $t('index.none')}}</text></view>
<view class="lable">专场结束时间:<text
class="value">{{item.specialEndTime}}</text>
</view>
<view class="lable">报名截止时间:<text
class="value">{{item.signEndDate}}</text>
</view>
<view class="lable">添加商品:<text
class="value">{{item.productNum}}</text>
</view>
<view class="lable">参与买家:<text
class="value">{{item.joinBuyerNum}}</text>
</view>
</view>
</view>
<view class="flag-box">
<view :class="
item.releaseStatus
? 'success flag'
: 'danger flag'
">
{{item.releaseStatus? '上架' : '下架'}}
</view>
</view>
<view class="handle-box" @click="openHandle(item, index)">
<view class="handle">
<view class="icon">
<uni-icons type="more-filled" size="20" color="#333"></uni-icons>
</view>
</view>
</view>
<no-data :show="isNoData"></no-data>
</view>
<uni-load-more :status="listStatus"></uni-load-more>
<uni-popup backgroundColor="white" ref="handPopup" type="bottom" @change="handPopupChange"
:safe-area="false">
<view class="handle-list">
<view class="handle" v-for="(item,index) in handleList" :key="index" @click="onHandleDetail(item)">
{{item.name}}
</view>
<view style="border-bottom: none;border-top: 4px solid #f6f7f8;" class="handle cancel" @click="$refs.handPopup.close()">取消</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
getSchedule, scheduleUpdateStatus, scheduleDelete, auctionSpecialPage, auctionSpecialUpdateStatus
} from '@/config/api.js'
import {web} from "@/utils/util";
let current_order_key = null;
export default {
data() {
return {
query:{
title: '',
},
icon: web('icon_search.png'),
list: [],
total: 0,
page: 1,
limit: 10,
isNoData: false,
listStatus: 'more',
loading: false,
handleList:[]
};
},
created() {
this.getList()
},
methods: {
getList() {
auctionSpecialPage({},
{
params: {
page: this.page,
rows: this.limit,
title:this.query.name
}
}
).then(res => {
if (res.content.content.length === 0) {
this.isNoData = true
}
if (this.page === 1) {
this.list = res.content.content
} else {
this.list = [...this.list, ...res.content.content]
}
this.total = res.content.totalElements
this.loading = false
if (this.page >= res.content.totalPages) {
this.listStatus = 'noMore'
} else {
this.page++
this.listStatus = 'more'
}
})
},
onReachBottom() {
if (this.listStatus === 'noMore') return
this.listStatus = 'loading'
this.getList()
},
onSearch() {
this.page = 1
this.getList()
},
openHandle(row,index){
let handleList = []
handleList = [{
name: this.$t('index.detail'),
type: 'detail'
},
{
name:'买家审核',
type: 'onVerifyBuyer'
},
{
name:'店铺审核',
type: 'onVerifySeller'
},
]
if(row.releaseStatus ){
handleList.push(
{
name:'下架',
type: 'updateEnable'
}
)
}else {
handleList.push(
{
name:'上架',
type: 'updateEnable'
},
// {
// name:'编辑',
// type: 'addgetlist'
// }
)
}
current_order_key = index
this.handleList = handleList
this.$nextTick(() => {
this.$refs.handPopup.open()
})
},
handPopupChange(e) {
if (e.show) {
wx.hideTabBar()
} else {
wx.showTabBar()
}
},
onHandleDetail(item){
this.$refs.handPopup.close()
let _this = this;
let id = this.list[current_order_key].id
let status = this.list[current_order_key].releaseStatus
switch (item.type) {
case 'detail':
uni.navigateTo({
url: `/pages/detail/index?id=${id}&type=${item.type}`
})
break;
case 'onVerifyBuyer':
uni.navigateTo({
url: `/pages/verify/buyer?id=${id}`
})
break;
case 'onVerifySeller':
uni.navigateTo({
url: `/pages/verify/seller?id=${id}`
})
break;
case 'updateEnable':
this.updateEnable(id,status)
break;
case 'handleDelete':
this.handleDelete(id)
break;
}
},
updateEnable(id,status){
const param =
status == 1
? {
msg: "下架成功",
value: false,
id: id
}
: {
msg: "上架成功",
value: true,
id: id
};
auctionSpecialUpdateStatus(param).then(res => {
this.page =1
this.getList();
setTimeout(() => {
uni.showToast({
title: param.msg,
icon: "none"
});
}, 500)
})
},
handleDelete(id){
scheduleDelete(id).then(res => {
this.page =1
this.getList();
setTimeout(() => {
uni.showToast({
title: '删除成功!',
icon: "none"
});
}, 500)
})
},
scheduleFilter(value) {
if (value == '0') {
return "待发布";
}
if (value == '1') {
return "已上架";
}
if (value == '2') {
return "已过期";
}
if (value == '3') {
return "已下架";
}
if (value == '4') {
return "已完成";
}
}
}
}
</script>
<style lang="scss">
.container {
background: transparent;
}
.btn-box {
padding: 0 20rpx;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.1);
border-radius: 10rpx;
background: #FFFFFF;
display: flex;
align-items: center;
.btn{
flex: none;
width: 100%;
font-size: 28rpx;
}
}
.serch-box {
padding: 20rpx 30rpx;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.1);
border-radius: 0px 0px 10rpx 10rpx;
background: #FFFFFF;
}
.condition-box {
display: flex;
align-items: center;
.search-box {
flex: auto;
position: relative;
.uni-input {
font-size: 14px;
color: #333;
height: 88rpx;
line-height: 66rpx;
border-radius: 12rpx;
padding-left: 42px;
padding-right: 10px;
background: #F3F3F3;
}
.icon {
position: absolute;
left: 10px;
top: 10px;
width: 48rpx;
height: 48rpx;
z-index: 1;
}
}
.screen-box {
flex: none;
height: 100%;
display: flex;
align-items: center;
margin-left: 30rpx;
.text {
font-size: 28rpx;
color: #99A0AF;
}
.image {
width: 48rpx;
height: 48rpx;
margin-left: 5px;
}
}
}
.list-box {
background: #FFFFFF;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.08);
margin: 30rpx 30rpx 0 30rpx;
padding: 20rpx 30rpx;
border: 1rpx solid #D5E2F3;
position: relative;
.order-code {
height: 68rpx;
display: flex;
justify-content: space-between;
align-items: center;
.code {
font-size: 28rpx;
color: #B60001;
}
}
.content-detail {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
.left {
display: flex;
flex-direction: column;
.lable {
margin: 10rpx 0;
font-size: 28rpx;
color: #99A0AF;
.value {
color: #222;
}
}
}
.right {
font-size: 12px;
color: #B60001;
.price {
font-size: 40rpx;
color: #B60001;
}
}
}
.flag-box {
height: 86rpx;
display: flex;
align-items: center;
.text {
font-size: 28rpx;
color: #99A0AF;
}
.flag {
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 2rpx;
font-size: 12px;
box-sizing: border-box;
margin-left: 20rpx;
padding: 0 20rpx;
&.unPay {
color: #CE963D;
background-color: #FFFFFF;
border: 1rpx solid #E8CDA3;
}
&.success {
border: 1px solid #33B345;
color: #33B345;
}
&.danger{
border: 1px solid #B60001;
color: #B60001;
}
&.warning{
border: 1px solid #FFB400;
color: #FFB400;
}
&.info{
border: 1px solid #99A0AF;
color: #99A0AF;
}
&.primary{
border: 1px solid #007AFF;
color: #007AFF;
}
}
}
.flag:nth-child(1) {
margin-left: 0;
}
.handle-box {
position: absolute;
top: 0;
right: 30rpx;
.handle {
display: flex;
justify-content: center;
align-items: center;
height: 88rpx;
font-size: 0;
.icon {
width: 14px;
height: 14px;
line-height: 16px;
text-align: center;
}
.text {
font-size: 28rpx;
color: #FFFFFF;
margin-left: 4px;
}
}
}
}
.handle-list {
background-color: #fff;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
max-height: 70vh;
// min-height: 40vh;
overflow-y: auto;
.handle {
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 28rpx;
color: #333;
border-bottom: 1rpx solid #F6F7F8;
&.cancel {
color: #B60001;
}
}
}
</style>
......@@ -55,6 +55,27 @@
<uni-load-more :status="listStatus" :contentText="contentText"></uni-load-more>
<xzj-firsthint :isCustom="false" /> -->
<!-- 集采 竞拍-->
<view class="quick-entry">
<view class="item" @click="quickEntry(1)" v-if="isPlatformType">
<span class="icon">
</span>
<text>集采专场</text>
</view>
<view class="item" @click="quickEntry(2)" v-if="isPlatformType">
<span class="icon">
</span>
<text>竞拍专场</text>
</view>
<view class="item" @click="quickEntry(3)" >
<span class="icon">
</span>
<text>循环盘</text>
</view>
</view>
</view>
<no-data :show="nodata"></no-data>
</view>
......@@ -80,6 +101,7 @@
},
data() {
return {
userInfo: JSON.parse(uni.getStorageSync('userInfo')),
icon: web('logo_title.png'),
page: 1,
p: 1, //源头货源
......@@ -95,6 +117,7 @@
nodata: false,
showControls: false,
video: null,
isPlatformType:false,
contentText: {
contentdown: this.$t('index.pull.more'),
contentrefresh: this.$t('index.pull.loading'),
......@@ -102,8 +125,35 @@
}
}
},
created() {
if(this.userInfo.userCurrentPlat.platformType.indexOf('operator') !== -1){
this.isPlatformType = true
}
},
methods: {
quickEntry(num){
let isLogin = uni.getStorageSync('userInfo')
if(isLogin){
console.log('isLogin',isLogin)
if(num == 1){
uni.navigateTo({
url: '/pages/schedule/index'
})
}else if(num == 2){
uni.navigateTo({
url: '/pages/auctionSpecial/index'
})
}else if(num == 3){
uni.navigateTo({
url: '/pages/circular/index'
})
}
}else {
uni.navigateTo({
url: '/pages/login/index?url=' + encodeURIComponent('/pages/home/index')
})
}
},
stopTouchMove() {
return false
},
......@@ -509,4 +559,58 @@
height: 100%;
}
}
.quick-entry {
background-color: #ffffff;
padding: 40rpx 30rpx 0;
border-radius: 16rpx;
display: flex;
flex-wrap: wrap;
margin-top: 30rpx;
.item {
width: 25%;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
margin-bottom: 40rpx;
.item-img {
position: relative;
font-size: 0;
.num {
position: absolute;
top: -5px;
left: 75%;
font-size: 20rpx;
color: #FFFFFF;
padding: 2px 4px;
background-color: #F6C864;
border-radius: 20rpx;
min-width: 20rpx;
text-align: center;
}
}
.icon {
width: 90rpx;
height: 90rpx;
display: block;
background: #B60001;
color: #fff;
border-radius: 10rpx;
text-align: center;
line-height: 90rpx;
}
text {
margin-top: 12rpx;
font-size: 28rpx;
color: #373737;
}
}
}
</style>
<template>
<view class="container" >
<uni-collapse ref="collapse">
<!-- 保证金审核 -->
<uni-collapse-item style="margin-top: 0;" name="message" :open="true">
<template v-slot:title>
<view class="title-box">
<text class="order-title">保证金审核</text>
<text class="flag"></text>
</view>
</template>
<uni-list class="custom-uni-list">
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" :title="$t('index.buyer-name')"
:rightText="marginInfo.buyerName"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" :title="$t('index.buyer-code')"
:rightText="marginInfo.buyerCode"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" :title="$t('index.seller-name')"
:rightText="marginInfo.orderedQuantity"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="本次保证金缴纳金额"
:rightText="marginInfo.marginAmount"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="保证金缴纳时间"
:rightText="marginInfo.payTime"></uni-list-item>
</view>
</uni-list>
<view class="image-list ">
<text class="enclosure-text">{{$t('index.annex')}}:</text>
<view class="image">
<view class="enclosure" v-for="(img, index) in marginInfo.fileResponseList"
:key="img.id" @click="lookDeposit(img, index)">
{{$t('index.annex')}}{{ index + 1 }}-预览
</view>
</view>
</view>
</uni-collapse-item>
<!-- 集采计划信息 -->
<uni-collapse-item name="message" :open="true">
<template v-slot:title>
<view class="title-box">
<text class="order-title">集采计划信息</text>
<text class="flag"></text>
</view>
</template>
<uni-list class="custom-uni-list">
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="集采标题"
:rightText="form.title"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="集采结束时间"
:rightText="form.deadline"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="集采计划说明"
:rightText="form.description"></uni-list-item>
</view>
</uni-list>
<view class="image-list " style="flex-flow: column">
<text class="enclosure-text">封面图片:</text>
<view class="image" style="width: 100%">
<image :src="imageUrl"></image>
</view>
</view>
</uni-collapse-item>
<!-- 集采商品清单 -->
<uni-collapse-item name="message" :open="true">
<template v-slot:title>
<view class="title-box">
<text class="order-title">集采商品清单</text>
<text class="flag"></text>
</view>
</template>
<uni-list class="custom-uni-list" v-for="(item, index) in productList">
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="商品名称"
:rightText="item.productName"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="工厂名称"
:rightText="item.supplierName"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="税率"
:rightText="item.productVo.taxRate+'%'"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="参考价"
:rightText="item.referencePrice"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="集采总量"
:rightText="item.totalQuantity"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="最少起订数量"
:rightText="item.minOrderQuantity"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="定金比例(%)"
:rightText="item.marginAmount"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="截止时间"
:rightText="item.deadline"></uni-list-item>
</view>
</uni-list>
</uni-collapse-item>
</uni-collapse>
<view class="orderType-box">
<block v-if="type === 'waitAudit'">
<view class="btn-btm">
<view style="flex: 1;">
<button class="button red"
@click="confirmOrder('确认驳回此保证金吗?', 'auditStatus', false)">{{ $t('index.reject') }}</button>
</view>
<view style="flex: 1;margin-left:30rpx;">
<button style="background: #086DCA;" @click="confirmOrder('确认审核通过吗?', 'auditStatus', true)"
class="button blue">{{ $t('index.sure') }}</button>
</view>
</view>
</block>
</view>
</view>
</template>
<script>
import {
centralizedPurchasingRegister,
centralizedPurchasingRegisterAudit,
depositConfirmSubmit,
downloadFileById
} from "@/config/api";
import serverConfig from "@/config/server_config";
export default {
data() {
return {
marginInfo: {},
loading: false,
type:'',
form: {
imageId: ""
},
imageUrl:'',
productList: [],
showTurndown: false,
formTurndown: {},
id: '',
};
},
onLoad(options) {
this.type = options.type
this.id = options.id
this.init(options.id)
},
methods: {
init(id) {
centralizedPurchasingRegister(
{
id: id,
}
).then(res => {
this.form = res.content.schedule;
this.productList.push(res.content.product);
this.marginInfo = res.content.register;
this.$nextTick(()=>{
this.getImage(this.form.imageId)
})
})
},
getImage(id){
downloadFileById(id).then(res => {
this.imageUrl = serverConfig.baseURL +"/"+ res.content[0].fullFilePath
console.log(this.form.imageUrl,res)
})
},
lookDeposit(data, index) {
console.log(data)
uni.previewImage({
current: index,
urls: [data],
})
},
confirmOrder(content, type, data) {
let _this = this;
uni.showModal({
title: this.$t('index.msg-notice-tip'),
content,
success: function(res) {
if (res.confirm) {
switch (type) {
case 'auditStatus':
_this.auditStatus(data)
break;
default:
break
}
}
}
});
},
auditStatus(flag) {
centralizedPurchasingRegisterAudit({
id: this.id,
marginStatus: flag ? 'auditPass' : 'notPass',
content: ''
}).then(res => {
uni.showToast({
title: `${flag ? '审核': '驳回'}成功!`,
icon: 'none'
});
setTimeout(() => {
uni.navigateBack({
delta: 1,
});
}, 1500)
})
},
}
}
</script>
<style lang="scss">
.container {
/deep/ .uni-collapse {
background-color: #F5F5F6;
}
/deep/ .uni-collapse-item {
margin-top: 10px;
background-color: #fff;
}
}
.title-box {
height: 110rpx;
padding-left: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.order-title {
font-size: 34rpx;
color: #ADB0B5;
line-height: 1;
position: relative;
}
.flag {
font-size: 12px;
color: #99A0AF;
vertical-align: middle;
}
.message {
font-size: 15px;
color: #222;
}
.price-box {
line-height: 1;
vertical-align: middle;
.unit {
color: #B60001;
font-size: 12px;
}
.price {
font-size: 40rpx;
color: #B60001;
margin-right: 20rpx;
}
}
}
.image-list {
margin-top: 20rpx;
display: flex;
box-sizing: border-box;
width: 100%;
font-size: 16px;
padding: 12px 15px;
.enclosure-text {
flex: none;
font-size: 14px;
color: #99A0AF;
}
.image {
// display: flex;
// flex-wrap: wrap;
.enclosure {
font-size: 14px;
color: #636872;
// margin-right: 50rpx;
word-break: break-all;
&+.enclosure {
margin-top: 20rpx;
}
}
}
}
.orderType-box {
position: fixed;
left: 0;
bottom: 0;
right: 0;
z-index: 8;
background: #fff;
padding: 0 30rpx 30rpx;
.button {
height: 92rpx;
line-height: 92rpx;
color: #fff;
font-size: 14px;
border-radius: 0;
}
}
.btn-btm {
display: flex;
align-items: center;
justify-content: space-around;
padding: 0 30rpx;
}
.button {
&.red {
background-color: #DE0000;
}
&.orange {
background-color: #F36E03;
}
&.blue {
background-color: #B60001;
}
&.yellow {
background-color: #dfc803;
}
&.green {
background-color: #03d97d;
}
&::after {
border-radius: 0;
border: 0;
}
}
</style>
<template>
<view class="container" >
<uni-collapse ref="collapse">
<!-- 集采计划信息 -->
<uni-collapse-item name="message" :open="true">
<template v-slot:title>
<view class="title-box">
<text class="order-title">集采计划信息</text>
<text class="flag"></text>
</view>
</template>
<uni-list class="custom-uni-list">
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="集采标题"
:rightText="form.title"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="集采结束时间"
:rightText="form.deadline"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="集采计划说明"
:rightText="form.description"></uni-list-item>
</view>
</uni-list>
<view class="image-list " style="flex-flow: column">
<text class="enclosure-text">封面图片:</text>
<view class="image" style="width: 100%">
<image :src="imageUrl"></image>
</view>
</view>
</uni-collapse-item>
<!-- 集采商品清单 -->
<uni-collapse-item name="message" :open="true">
<template v-slot:title>
<view class="title-box">
<text class="order-title">集采商品清单</text>
<text class="flag"></text>
</view>
</template>
<uni-list class="custom-uni-list" v-for="(item, index) in productList">
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="商品名称"
:rightText="item.productName"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="工厂名称"
:rightText="item.supplierName"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="税率"
:rightText="item.productVo.taxRate+'%'"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="参考价"
:rightText="item.referencePrice"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="集采总量"
:rightText="item.totalQuantity"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="最少起订数量"
:rightText="item.minOrderQuantity"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="定金比例(%)"
:rightText="item.marginAmount"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="截止时间"
:rightText="item.deadline"></uni-list-item>
</view>
</uni-list>
</uni-collapse-item>
</uni-collapse>
<view class="orderType-box">
<block v-if="type === 'waitAudit'">
<view class="btn-btm">
<view style="flex: 1;">
<button class="button red"
@click="confirmOrder('确认驳回此保证金吗?', 'auditStatus', false)">{{ $t('index.reject') }}</button>
</view>
<view style="flex: 1;margin-left:30rpx;">
<button style="background: #086DCA;" @click="confirmOrder('确认审核通过吗?', 'auditStatus', true)"
class="button blue">{{ $t('index.sure') }}</button>
</view>
</view>
</block>
</view>
</view>
</template>
<script>
import {
centralizedPurchasingRegister,
centralizedPurchasingRegisterAudit, centralizedPurchasingSchedule,
depositConfirmSubmit,
downloadFileById
} from "@/config/api";
import serverConfig from "@/config/server_config";
export default {
data() {
return {
marginInfo: {},
loading: false,
type:'',
form: {
imageId: ""
},
imageUrl:'',
productList: [],
showTurndown: false,
formTurndown: {},
id: '',
};
},
onLoad(options) {
this.type = options.type
this.id = options.id
this.init(options.id)
},
methods: {
init(id) {
centralizedPurchasingSchedule(
{
id: id,
}
).then(res => {
this.form = res.content;
this.productList= res.content.productList;
this.$nextTick(()=>{
this.getImage(this.form.imageId)
})
})
},
getImage(id){
downloadFileById(id).then(res => {
this.imageUrl = serverConfig.baseURL +"/"+ res.content[0].fullFilePath
console.log(this.form.imageUrl,res)
})
},
lookDeposit(data, index) {
console.log(data)
uni.previewImage({
current: index,
urls: [data],
})
},
confirmOrder(content, type, data) {
let _this = this;
uni.showModal({
title: this.$t('index.msg-notice-tip'),
content,
success: function(res) {
if (res.confirm) {
switch (type) {
case 'auditStatus':
_this.auditStatus(data)
break;
default:
break
}
}
}
});
},
auditStatus(flag) {
centralizedPurchasingRegisterAudit({
id: this.id,
marginStatus: flag ? 'auditPass' : 'notPass',
content: ''
}).then(res => {
uni.showToast({
title: `${flag ? '审核': '驳回'}成功!`,
icon: 'none'
});
setTimeout(() => {
uni.navigateBack({
delta: 1,
});
}, 1500)
})
},
}
}
</script>
<style lang="scss">
.container {
/deep/ .uni-collapse {
background-color: #F5F5F6;
}
/deep/ .uni-collapse-item {
margin-top: 10px;
background-color: #fff;
}
}
.title-box {
height: 110rpx;
padding-left: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.order-title {
font-size: 34rpx;
color: #ADB0B5;
line-height: 1;
position: relative;
}
.flag {
font-size: 12px;
color: #99A0AF;
vertical-align: middle;
}
.message {
font-size: 15px;
color: #222;
}
.price-box {
line-height: 1;
vertical-align: middle;
.unit {
color: #B60001;
font-size: 12px;
}
.price {
font-size: 40rpx;
color: #B60001;
margin-right: 20rpx;
}
}
}
.image-list {
margin-top: 20rpx;
display: flex;
box-sizing: border-box;
width: 100%;
font-size: 16px;
padding: 12px 15px;
.enclosure-text {
flex: none;
font-size: 14px;
color: #99A0AF;
}
.image {
// display: flex;
// flex-wrap: wrap;
.enclosure {
font-size: 14px;
color: #636872;
// margin-right: 50rpx;
word-break: break-all;
&+.enclosure {
margin-top: 20rpx;
}
}
}
}
.orderType-box {
position: fixed;
left: 0;
bottom: 0;
right: 0;
z-index: 8;
background: #fff;
padding: 0 30rpx 30rpx;
.button {
height: 92rpx;
line-height: 92rpx;
color: #fff;
font-size: 14px;
border-radius: 0;
}
}
.btn-btm {
display: flex;
align-items: center;
justify-content: space-around;
padding: 0 30rpx;
}
.button {
&.red {
background-color: #DE0000;
}
&.orange {
background-color: #F36E03;
}
&.blue {
background-color: #B60001;
}
&.yellow {
background-color: #dfc803;
}
&.green {
background-color: #03d97d;
}
&::after {
border-radius: 0;
border: 0;
}
}
</style>
<template>
<view class="container">
<block>
<view class="serch-box">
<view class="condition-box">
<view class="search-box">
<image :src="icon" class="icon"></image>
<input class="uni-input" v-model="query.buyerName" confirm-type="search"
:placeholder="$t('index.enter')+'买家名称'" @keyup.enter.native="onSearch" placeholder-style="color:#B9B9B9" />
</view>
<view class="btn-box">
<button class="btn" @click="onSearch">搜索</button>
</view>
</view>
</view>
</block>
<view class="list-box" v-for="(item, index) in list" :key="item.orderNum">
<view class="content-detail">
<view class="left">
<view class="lable">集采登记单号:<text class="value">{{item.code}}</text>
</view>
<view class="lable">买家编码:<text
class="value">{{item.buyerCode}}</text>
</view>
<view class="lable">买家名称:<text
class="value">{{item.buyerName}}</text>
</view>
<view class="lable">保证金缴纳金额:<text
class="value">{{item.marginAmount}}</text>
</view>
<view class="lable">购买商品数量:<text
class="value">{{item.orderedQuantity}}</text>
</view>
<view class="lable">缴纳状态:
<view :class="
item.marginStatus === 'auditPass'
? 'success flag'
: item.marginStatus === 'waitAudit'
? 'danger flag'
: item.marginStatus === 'notPass'
? 'warning flag'
: 'info flag'
">
{{item.marginStatusName}}
</view>
</view>
</view>
</view>
<view class="handle-box" @click="openHandle(item, index)">
<view class="handle">
<view class="icon">
<uni-icons type="more-filled" size="20" color="#333"></uni-icons>
</view>
</view>
</view>
<no-data :show="isNoData"></no-data>
</view>
<uni-load-more :status="listStatus"></uni-load-more>
<uni-popup backgroundColor="white" ref="handPopup" type="bottom" @change="handPopupChange"
:safe-area="false">
<view class="handle-list">
<view class="handle" v-for="(item,index) in handleList" :key="index" @click="onHandleDetail(item)">
{{item.name}}
</view>
<view style="border-bottom: none;border-top: 4px solid #f6f7f8;" class="handle cancel" @click="$refs.handPopup.close()">取消</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
getCentralizedPurchasingRegisterList,
getSchedule
} from '@/config/api.js'
import {web} from "@/utils/util";
let current_order_key = null;
export default {
data() {
return {
query:{
buyerName: '',
id: '',
},
icon: web('icon_search.png'),
list: [],
total: 0,
page: 1,
limit: 10,
isNoData: false,
listStatus: 'more',
loading: false,
handleList:[],
statusOptions: [
{
key: "waitAudit",
value: "待审核"
},
{
key: "auditPass",
value: "审核通过"
},
{
key: "notPass",
value: "审核拒绝"
}
],
};
},
onLoad() {
this.query.id = this.$route.query.id
this.getList()
},
onShow(){
// 如果是提交状态返回isRefresh=1,才刷新页面,从详情过来无需刷新
let pages = getCurrentPages();
let currPage = pages[pages.length - 1];
if(currPage.__data__.isRefresh){
// 重新获取数据
this.getList(true)//获取列表数据
// 每一次需要清除,否则会参数会缓存
currPage.__data__.isRefresh=false
}
},
methods: {
getList() {
getCentralizedPurchasingRegisterList({},
{
params: {
page: this.page,
rows: this.limit,
title:this.query.buyerName,
scheduleId:this.query.id
}
}
).then(res => {
if (res.content.content.length === 0) {
this.isNoData = true
}
if (this.page === 1) {
this.list = res.content.content
} else {
this.list = [...this.list, ...res.content.content]
}
this.total = res.content.totalElements
this.loading = false
if (this.page >= res.content.totalPages) {
this.listStatus = 'noMore'
} else {
this.page++
this.listStatus = 'more'
}
})
},
onReachBottom() {
if (this.listStatus === 'noMore') return
this.listStatus = 'loading'
this.getList()
},
onSearch() {
this.page = 1
this.getList()
},
openHandle(row,index){
let handleList = []
handleList = [{
name: this.$t('index.detail'),
type: 'detail'
}]
if(row.marginStatus == 'waitAudit'){
handleList.push(
{
name:'定金审核',
type: 'waitAudit'
},
)
}
current_order_key = index
this.handleList = handleList
this.$nextTick(() => {
this.$refs.handPopup.open()
})
},
handPopupChange(e) {
if (e.show) {
wx.hideTabBar()
} else {
wx.showTabBar()
}
},
onHandleDetail(item){
console.log(item)
this.$refs.handPopup.close()
let _this = this;
let id = this.list[current_order_key].id
uni.navigateTo({
url: `/pages/marginDetail/index?id=${id}&type=${item.type}`
})
},
}
}
</script>
<style lang="scss">
.container {
background: transparent;
}
.btn-box {
padding: 0 20rpx;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.1);
border-radius: 10rpx;
background: #FFFFFF;
display: flex;
align-items: center;
.btn{
flex: none;
width: 100%;
font-size: 28rpx;
}
}
.serch-box {
padding: 20rpx 30rpx;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.1);
border-radius: 0px 0px 10rpx 10rpx;
background: #FFFFFF;
}
.condition-box {
display: flex;
align-items: center;
.search-box {
flex: auto;
position: relative;
.uni-input {
font-size: 14px;
color: #333;
height: 88rpx;
line-height: 66rpx;
border-radius: 12rpx;
padding-left: 42px;
padding-right: 10px;
background: #F3F3F3;
}
.icon {
position: absolute;
left: 10px;
top: 10px;
width: 48rpx;
height: 48rpx;
z-index: 1;
}
}
.screen-box {
flex: none;
height: 100%;
display: flex;
align-items: center;
margin-left: 30rpx;
.text {
font-size: 28rpx;
color: #99A0AF;
}
.image {
width: 48rpx;
height: 48rpx;
margin-left: 5px;
}
}
}
.list-box {
background: #FFFFFF;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.08);
margin: 30rpx 30rpx 0 30rpx;
padding: 20rpx 30rpx;
border: 1rpx solid #D5E2F3;
position: relative;
.order-code {
height: 68rpx;
display: flex;
justify-content: space-between;
align-items: center;
.code {
font-size: 28rpx;
color: #B60001;
}
}
.content-detail {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
.left {
display: flex;
flex-direction: column;
.lable {
margin: 10rpx 0;
font-size: 28rpx;
color: #99A0AF;
.value {
color: #222;
}
.flag {
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 2rpx;
font-size: 12px;
box-sizing: border-box;
margin-left: 20rpx;
padding: 0 20rpx;
display: inline-block;
&.unPay {
color: #CE963D;
background-color: #FFFFFF;
border: 1rpx solid #E8CDA3;
}
&.success {
border: 1px solid #33B345;
color: #33B345;
}
&.danger{
border: 1px solid #B60001;
color: #B60001;
}
&.warning{
border: 1px solid #FFB400;
color: #FFB400;
}
&.info{
border: 1px solid #99A0AF;
color: #99A0AF;
}
&.primary{
border: 1px solid #007AFF;
color: #007AFF;
}
}
}
}
.right {
font-size: 12px;
color: #B60001;
.price {
font-size: 40rpx;
color: #B60001;
}
}
}
.flag-box {
height: 86rpx;
display: flex;
align-items: center;
.text {
font-size: 28rpx;
color: #99A0AF;
}
.flag {
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 2rpx;
font-size: 12px;
box-sizing: border-box;
margin-left: 20rpx;
padding: 0 20rpx;
&.unPay {
color: #CE963D;
background-color: #FFFFFF;
border: 1rpx solid #E8CDA3;
}
&.payed {
color: #33B345;
background-color: #FFFFFF;
border: 1rpx solid #83D18E;
}
&.partPay {
color: #B60001;
background-color: #E6E7EB;
border: 1rpx solid #B60001;
}
}
}
.flag:nth-child(1) {
margin-left: 0;
}
.handle-box {
position: absolute;
top: 0;
right: 30rpx;
.handle {
display: flex;
justify-content: center;
align-items: center;
height: 88rpx;
font-size: 0;
.icon {
width: 14px;
height: 14px;
line-height: 16px;
text-align: center;
}
.text {
font-size: 28rpx;
color: #FFFFFF;
margin-left: 4px;
}
}
}
}
.handle-list {
background-color: #fff;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
max-height: 70vh;
// min-height: 40vh;
overflow-y: auto;
.handle {
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 28rpx;
color: #333;
border-bottom: 1rpx solid #F6F7F8;
&.cancel {
color: #B60001;
}
}
}
</style>
<template>
<view class="container">
<block>
<view class="serch-box">
<view class="condition-box">
<view class="search-box">
<image :src="icon" class="icon"></image>
<input class="uni-input" v-model="query.title" confirm-type="search"
:placeholder="$t('index.enter')+'集采标题'" @keyup.enter.native="onSearch" placeholder-style="color:#B9B9B9" />
</view>
<view class="btn-box">
<button class="btn" @click="onSearch">搜索</button>
</view>
</view>
</view>
</block>
<view class="list-box" v-for="(item, index) in list" :key="item.orderNum">
<view class="content-detail">
<view class="left">
<view class="lable">集采标题:<text class="value">{{item.title}}</text>
</view>
<view class="lable">集采商品:<text
class="value">{{item.productName || $t('index.none')}}</text></view>
<view class="lable">集采数量:<text
class="value">{{item.totalQuantity}}</text>
</view>
<view class="lable">集采状态:<text
class="value">{{item.timeDesc}}</text>
</view>
<view class="lable">参与买家:<text
class="value">{{item.buyerCount}}</text>
</view>
<view class="lable">截止时间:<text
class="value">{{item.deadline}}</text>
</view>
</view>
</view>
<view class="flag-box">
<view class="flag unPay">{{item.timeDesc}}</view>
<view :class="
item.status === '4'
? 'success flag'
: item.status === '3'
? 'danger flag'
: item.status === '0'
? 'warning flag'
: item.status === '1'
? 'primary flag'
: 'info flag'
">
{{item.status?scheduleFilter(item.status): $t('index.none')}}
</view>
</view>
<view class="handle-box" @click="openHandle(item, index)">
<view class="handle">
<view class="icon">
<uni-icons type="more-filled" size="20" color="#333"></uni-icons>
</view>
</view>
</view>
<no-data :show="isNoData"></no-data>
</view>
<uni-load-more :status="listStatus"></uni-load-more>
<uni-popup backgroundColor="white" ref="handPopup" type="bottom" @change="handPopupChange"
:safe-area="false">
<view class="handle-list">
<view class="handle" v-for="(item,index) in handleList" :key="index" @click="onHandleDetail(item)">
{{item.name}}
</view>
<view style="border-bottom: none;border-top: 4px solid #f6f7f8;" class="handle cancel" @click="$refs.handPopup.close()">取消</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
getSchedule, scheduleUpdateStatus,scheduleDelete
} from '@/config/api.js'
import {web} from "@/utils/util";
let current_order_key = null;
export default {
data() {
return {
query:{
title: '',
},
icon: web('icon_search.png'),
list: [],
total: 0,
page: 1,
limit: 10,
isNoData: false,
listStatus: 'more',
loading: false,
handleList:[]
};
},
created() {
this.getList()
},
methods: {
getList() {
getSchedule({},
{
params: {
page: this.page,
rows: this.limit,
title:this.query.title
}
}
).then(res => {
if (res.content.content.length === 0) {
this.isNoData = true
}
if (this.page === 1) {
this.list = res.content.content
} else {
this.list = [...this.list, ...res.content.content]
}
this.total = res.content.totalElements
this.loading = false
if (this.page >= res.content.totalPages) {
this.listStatus = 'noMore'
} else {
this.page++
this.listStatus = 'more'
}
})
},
onReachBottom() {
if (this.listStatus === 'noMore') return
this.listStatus = 'loading'
this.getList()
},
onSearch() {
this.page = 1
this.getList()
},
openHandle(row,index){
let handleList = []
handleList = [{
name: this.$t('index.detail'),
type: 'detail'
}]
if(row.status == 1){
handleList.push(
{
name:'买家定金审核',
type: 'toMarginList'
},
{
name:'转订单',
type: 'toTurnOrder'
},
{
name:'下架',
type: 'updateEnable'
}
)
}else if(row.status == 0 || row.status == 3){
handleList.push(
{
name:'上架',
type: 'updateEnable'
},
{
name:'删除',
type: 'handleDelete'
},
)
}
current_order_key = index
this.handleList = handleList
this.$nextTick(() => {
this.$refs.handPopup.open()
})
},
handPopupChange(e) {
if (e.show) {
wx.hideTabBar()
} else {
wx.showTabBar()
}
},
onHandleDetail(item){
this.$refs.handPopup.close()
let _this = this;
let id = this.list[current_order_key].id
let status = this.list[current_order_key].status
switch (item.type) {
case 'detail':
uni.navigateTo({
url: `/pages/marginDetail/schedule-edit?id=${id}&type=${item.type}`
})
break;
case 'toMarginList':
uni.navigateTo({
url: `/pages/marginManagement/index?id=${id}`
})
break;
case 'toTurnOrder':
uni.navigateTo({
url: `/pages/turnOrder/index?id=${id}`
})
break;
case 'updateEnable':
this.updateEnable(id,status)
break;
case 'handleDelete':
this.handleDelete(id)
break;
}
},
updateEnable(id,status){
const param =
status == 1
? {
msg: "下架成功",
value: "3",
id: id
}
: {
msg: "上架成功",
value: "1",
id: id
};
scheduleUpdateStatus(param).then(res => {
this.page =1
this.getList();
setTimeout(() => {
uni.showToast({
title: param.msg,
icon: "none"
});
}, 500)
})
},
handleDelete(id){
scheduleDelete(id).then(res => {
this.page =1
this.getList();
setTimeout(() => {
uni.showToast({
title: '删除成功!',
icon: "none"
});
}, 500)
})
},
scheduleFilter(value) {
if (value == '0') {
return "待发布";
}
if (value == '1') {
return "已上架";
}
if (value == '2') {
return "已过期";
}
if (value == '3') {
return "已下架";
}
if (value == '4') {
return "已完成";
}
}
}
}
</script>
<style lang="scss">
.container {
background: transparent;
}
.btn-box {
padding: 0 20rpx;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.1);
border-radius: 10rpx;
background: #FFFFFF;
display: flex;
align-items: center;
.btn{
flex: none;
width: 100%;
font-size: 28rpx;
}
}
.serch-box {
padding: 20rpx 30rpx;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.1);
border-radius: 0px 0px 10rpx 10rpx;
background: #FFFFFF;
}
.condition-box {
display: flex;
align-items: center;
.search-box {
flex: auto;
position: relative;
.uni-input {
font-size: 14px;
color: #333;
height: 88rpx;
line-height: 66rpx;
border-radius: 12rpx;
padding-left: 42px;
padding-right: 10px;
background: #F3F3F3;
}
.icon {
position: absolute;
left: 10px;
top: 10px;
width: 48rpx;
height: 48rpx;
z-index: 1;
}
}
.screen-box {
flex: none;
height: 100%;
display: flex;
align-items: center;
margin-left: 30rpx;
.text {
font-size: 28rpx;
color: #99A0AF;
}
.image {
width: 48rpx;
height: 48rpx;
margin-left: 5px;
}
}
}
.list-box {
background: #FFFFFF;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.08);
margin: 30rpx 30rpx 0 30rpx;
padding: 20rpx 30rpx;
border: 1rpx solid #D5E2F3;
position: relative;
.order-code {
height: 68rpx;
display: flex;
justify-content: space-between;
align-items: center;
.code {
font-size: 28rpx;
color: #B60001;
}
}
.content-detail {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
.left {
display: flex;
flex-direction: column;
.lable {
margin: 10rpx 0;
font-size: 28rpx;
color: #99A0AF;
.value {
color: #222;
}
}
}
.right {
font-size: 12px;
color: #B60001;
.price {
font-size: 40rpx;
color: #B60001;
}
}
}
.flag-box {
height: 86rpx;
display: flex;
align-items: center;
.text {
font-size: 28rpx;
color: #99A0AF;
}
.flag {
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 2rpx;
font-size: 12px;
box-sizing: border-box;
margin-left: 20rpx;
padding: 0 20rpx;
&.unPay {
color: #CE963D;
background-color: #FFFFFF;
border: 1rpx solid #E8CDA3;
}
&.success {
border: 1px solid #33B345;
color: #33B345;
}
&.danger{
border: 1px solid #B60001;
color: #B60001;
}
&.warning{
border: 1px solid #FFB400;
color: #FFB400;
}
&.info{
border: 1px solid #99A0AF;
color: #99A0AF;
}
&.primary{
border: 1px solid #007AFF;
color: #007AFF;
}
}
}
.flag:nth-child(1) {
margin-left: 0;
}
.handle-box {
position: absolute;
top: 0;
right: 30rpx;
.handle {
display: flex;
justify-content: center;
align-items: center;
height: 88rpx;
font-size: 0;
.icon {
width: 14px;
height: 14px;
line-height: 16px;
text-align: center;
}
.text {
font-size: 28rpx;
color: #FFFFFF;
margin-left: 4px;
}
}
}
}
.handle-list {
background-color: #fff;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
max-height: 70vh;
// min-height: 40vh;
overflow-y: auto;
.handle {
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 28rpx;
color: #333;
border-bottom: 1rpx solid #F6F7F8;
&.cancel {
color: #B60001;
}
}
}
</style>
<template>
<view class="container">
<view class="list-box" v-for="(item, index) in list" :key="item.orderNum">
<view class="content-detail">
<view class="left">
<view class="lable">集采登记单号:<text class="value">{{item.code}}</text>
</view>
<view class="lable">买家编码:<text
class="value">{{item.buyerCode}}</text>
</view>
<view class="lable">买家名称:<text
class="value">{{item.buyerName}}</text>
</view>
<view class="lable">保证金缴纳金额:<text
class="value">{{item.marginAmount}}</text>
</view>
<view class="lable">购买商品数量:<text
class="value">{{item.orderedQuantity}}</text>
</view>
<view class="lable">缴纳状态:
<view :class="
item.marginStatus === 'auditPass'
? 'success flag'
: item.marginStatus === 'waitAudit'
? 'danger flag'
: item.marginStatus === 'notPass'
? 'warning flag'
: 'info flag'
">
{{item.marginStatusName}}
</view>
</view>
</view>
</view>
<!-- <view class="handle-box" @click="openHandle(item, index)">-->
<!-- <view class="handle">-->
<!-- <view class="icon">-->
<!-- <uni-icons type="more-filled" size="20" color="#333"></uni-icons>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<no-data :show="isNoData"></no-data>
</view>
<uni-load-more :status="listStatus"></uni-load-more>
<view class="orderType-box">
<block >
<view class="btn-btm">
<view style="flex: 1;">
<button class="button red"
@click="back">返回</button>
</view>
<view style="flex: 1;margin-left:30rpx;">
<button style="background: #086DCA;" @click="confirmOrder('是否确认将集采信息转换为采购订单?未审核通过及驳回的买家将退回定金!', 'auditStatus', true)"
class="button blue">转销售订单</button>
</view>
</view>
</block>
</view>
</view>
</template>
<script>
import {
centralizedPurchasingRegisterSales,
getCentralizedPurchasingRegisterList
} from '@/config/api.js'
import {web} from "@/utils/util";
let current_order_key = null;
export default {
data() {
return {
query:{
buyerName: '',
id: '',
},
icon: web('icon_search.png'),
list: [],
total: 0,
page: 1,
limit: 10,
isNoData: false,
listStatus: 'more',
loading: false,
handleList:[],
statusOptions: [
{
key: "waitAudit",
value: "待审核"
},
{
key: "auditPass",
value: "审核通过"
},
{
key: "notPass",
value: "审核拒绝"
}
],
};
},
onLoad(options) {
this.query.id =options.id
this.getList()
},
methods: {
getList() {
getCentralizedPurchasingRegisterList({},
{
params: {
page: this.page,
rows: this.limit,
scheduleId:this.query.id
}
}
).then(res => {
if (res.content.content.length === 0) {
this.isNoData = true
}
if (this.page === 1) {
this.list = res.content.content
} else {
this.list = [...this.list, ...res.content.content]
}
this.total = res.content.totalElements
this.loading = false
if (this.page >= res.content.totalPages) {
this.listStatus = 'noMore'
} else {
this.page++
this.listStatus = 'more'
}
})
},
onReachBottom() {
if (this.listStatus === 'noMore') return
this.listStatus = 'loading'
this.getList()
},
onSearch() {
this.page = 1
this.getList()
},
confirmOrder(content, type, data) {
let _this = this;
uni.showModal({
title: this.$t('index.msg-notice-tip'),
content,
success: function(res) {
if (res.confirm) {
switch (type) {
case 'auditStatus':
_this.turnSalesOrder(data)
break;
default:
break
}
}
}
});
},
turnSalesOrder(){
centralizedPurchasingRegisterSales(
{
id: this.query.id,
}
).then(res => {
uni.showToast({
title: `转销售订单成功!`
});
this.getList()
})
},
back(){
uni.navigateBack({
delta: 1,
});
}
}
}
</script>
<style lang="scss">
.container {
background: transparent;
}
.btn-box {
padding: 0 20rpx;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.1);
border-radius: 10rpx;
background: #FFFFFF;
display: flex;
align-items: center;
.btn{
flex: none;
width: 100%;
font-size: 28rpx;
}
}
.serch-box {
padding: 20rpx 30rpx;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.1);
border-radius: 0px 0px 10rpx 10rpx;
background: #FFFFFF;
}
.condition-box {
display: flex;
align-items: center;
.search-box {
flex: auto;
position: relative;
.uni-input {
font-size: 14px;
color: #333;
height: 88rpx;
line-height: 66rpx;
border-radius: 12rpx;
padding-left: 42px;
padding-right: 10px;
background: #F3F3F3;
}
.icon {
position: absolute;
left: 10px;
top: 10px;
width: 48rpx;
height: 48rpx;
z-index: 1;
}
}
.screen-box {
flex: none;
height: 100%;
display: flex;
align-items: center;
margin-left: 30rpx;
.text {
font-size: 28rpx;
color: #99A0AF;
}
.image {
width: 48rpx;
height: 48rpx;
margin-left: 5px;
}
}
}
.list-box {
background: #FFFFFF;
box-shadow: 0px 1px 8px 0px rgba(22, 119, 255, 0.08);
margin: 30rpx 30rpx 0 30rpx;
padding: 20rpx 30rpx;
border: 1rpx solid #D5E2F3;
position: relative;
.order-code {
height: 68rpx;
display: flex;
justify-content: space-between;
align-items: center;
.code {
font-size: 28rpx;
color: #B60001;
}
}
.content-detail {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
.left {
display: flex;
flex-direction: column;
.lable {
margin: 10rpx 0;
font-size: 28rpx;
color: #99A0AF;
.value {
color: #222;
}
.flag {
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 2rpx;
font-size: 12px;
box-sizing: border-box;
margin-left: 20rpx;
padding: 0 20rpx;
display: inline-block;
&.unPay {
color: #CE963D;
background-color: #FFFFFF;
border: 1rpx solid #E8CDA3;
}
&.success {
border: 1px solid #33B345;
color: #33B345;
}
&.danger{
border: 1px solid #B60001;
color: #B60001;
}
&.warning{
border: 1px solid #FFB400;
color: #FFB400;
}
&.info{
border: 1px solid #99A0AF;
color: #99A0AF;
}
&.primary{
border: 1px solid #007AFF;
color: #007AFF;
}
}
}
}
.right {
font-size: 12px;
color: #B60001;
.price {
font-size: 40rpx;
color: #B60001;
}
}
}
.flag-box {
height: 86rpx;
display: flex;
align-items: center;
.text {
font-size: 28rpx;
color: #99A0AF;
}
.flag {
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 2rpx;
font-size: 12px;
box-sizing: border-box;
margin-left: 20rpx;
padding: 0 20rpx;
&.unPay {
color: #CE963D;
background-color: #FFFFFF;
border: 1rpx solid #E8CDA3;
}
&.payed {
color: #33B345;
background-color: #FFFFFF;
border: 1rpx solid #83D18E;
}
&.partPay {
color: #B60001;
background-color: #E6E7EB;
border: 1rpx solid #B60001;
}
}
}
.flag:nth-child(1) {
margin-left: 0;
}
.handle-box {
position: absolute;
top: 0;
right: 30rpx;
.handle {
display: flex;
justify-content: center;
align-items: center;
height: 88rpx;
font-size: 0;
.icon {
width: 14px;
height: 14px;
line-height: 16px;
text-align: center;
}
.text {
font-size: 28rpx;
color: #FFFFFF;
margin-left: 4px;
}
}
}
}
.handle-list {
background-color: #fff;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
max-height: 70vh;
// min-height: 40vh;
overflow-y: auto;
.handle {
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 28rpx;
color: #333;
border-bottom: 1rpx solid #F6F7F8;
&.cancel {
color: #B60001;
}
}
}
.orderType-box {
position: fixed;
left: 0;
bottom: 0;
right: 0;
z-index: 8;
padding: 0 30rpx 30rpx;
.button {
height: 92rpx;
line-height: 92rpx;
color: #fff;
font-size: 14px;
border-radius: 0;
}
}
.btn-btm {
display: flex;
align-items: center;
justify-content: space-around;
padding: 0 30rpx;
}
.button {
&.red {
background-color: #DE0000;
}
&.orange {
background-color: #F36E03;
}
&.blue {
background-color: #B60001;
}
&.yellow {
background-color: #dfc803;
}
&.green {
background-color: #03d97d;
}
&::after {
border-radius: 0;
border: 0;
}
}
</style>
<template>
<view class="container" >
<uni-collapse ref="collapse">
<!-- 保证金审核 -->
<uni-collapse-item style="margin-top: 0;" name="message" :open="true">
<template v-slot:title>
<view class="title-box">
<text class="order-title">专场信息</text>
<text class="flag"></text>
</view>
</template>
<uni-list class="custom-uni-list">
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="专场名称"
:rightText="form.name"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="专场开始时间"
:rightText="form.specialStartTime"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="专场结束时间"
:rightText="form.specialEndTime"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="截止报名时间"
:rightText="form.signEndDate"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="是否允许中途报名"
:rightText="form.allowSign?'是':'否'"></uni-list-item>
</view>
</uni-list>
<view class="image-list " style="flex-flow: column">
<text class="enclosure-text">封面图片:</text>
<view class="image" style="width: 100%">
<image :src="imageUrl"></image>
</view>
</view>
</uni-collapse-item>
<!-- 集采商品清单 -->
<uni-collapse-item name="message" :open="true">
<template v-slot:title>
<view class="title-box">
<text class="order-title">保证金审核</text>
<text class="flag"></text>
</view>
</template>
<uni-list class="custom-uni-list" v-for="(item, index) in list" v-if="list.length>0">
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="买家编码"
:rightText="item.customerCode"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="买家名称"
:rightText="item.customerName"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="客户统一信用代码"
:rightText="item.creditCode"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="保证金缴纳金额"
:rightText="item.marginAmount"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="缴纳时间"
:rightText="item.payTime"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="行业"
:rightText="item.industryName"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="审核状态"
:rightText="transStatus(item.auditStatus?item.auditStatus:'')"></uni-list-item>
</view>
<view class="orderType-box list-item-bg" v-if="item.auditStatus !== 'confirm'">
<view class="btn-btm">
<view style="flex: 1;">
<button class="button red"
@click="confirmOrder('确认驳回吗?', 'auditStatus', false,item)">{{ $t('index.reject') }}</button>
</view>
<view style="flex: 1;margin-left:30rpx;">
<button style="background: #086DCA;" @click="confirmOrder('确认审核通过吗?', 'auditStatus', true,item)"
class="button blue">{{ $t('index.sure') }}</button>
</view>
</view>
</view>
</uni-list>
<no-data :show="list.length==0"></no-data>
</uni-collapse-item>
</uni-collapse>
</view>
</template>
<script>
import {
auctionSpecialGet, auditBuyerMarginInfo,
centralizedPurchasingRegister,
centralizedPurchasingRegisterAudit,
depositConfirmSubmit,
downloadFileById, findAuctionMarginInfo
} from "@/config/api";
import serverConfig from "@/config/server_config";
export default {
data() {
return {
loading: false,
type:'',
form: {
imageId: ""
},
imageUrl:'',
list: [],
showTurndown: false,
formTurndown: {},
id: '',
};
},
onLoad(options) {
this.type = options.type
this.id = options.id
this.init(options.id)
},
methods: {
init(id) {
auctionSpecialGet(
id
).then(res => {
this.form = res.content;
this.$nextTick(()=>{
this.getImage(this.form.imageFileIds)
})
})
findAuctionMarginInfo(
{
businessId: id,
businessTypes: 'auctionSpecial',
page: 1,
rows: 15
}
).then(res => {
this.list = res.content.content;
})
},
transStatus(item){
console.log(item)
switch (item) {
case 'auditPass':
return '审核通过'
break;
case 'notPass':
return '审核驳回'
break;
case 'confirm':
return '审核通过'
break;
default:
return '待审核'
break;
}
},
getImage(id){
downloadFileById(id).then(res => {
this.imageUrl = serverConfig.baseURL +"/"+ res.content[0].fullFilePath
console.log(this.form.imageUrl,res)
})
},
lookDeposit(data, index) {
console.log(data)
uni.previewImage({
current: index,
urls: [data],
})
},
confirmOrder(content, type, data,item) {
let _this = this;
uni.showModal({
title: this.$t('index.msg-notice-tip'),
content,
success: function(res) {
if (res.confirm) {
switch (type) {
case 'auditStatus':
_this.auditStatus(data,item)
break;
default:
break
}
}
}
});
},
auditStatus(flag,item) {
auditBuyerMarginInfo({
id: item.id,
auditStatus: flag ? 'confirm' : 'notPass',
refuseDesc: ''
}).then(res => {
uni.showToast({
title: `${flag ? '审核': '驳回'}成功!`,
icon: 'none'
});
this.list =[]
this.init(this.id)
})
},
}
}
</script>
<style lang="scss">
.container {
/deep/ .uni-collapse {
background-color: #F5F5F6;
}
/deep/ .uni-collapse-item {
margin-top: 10px;
background-color: #fff;
}
}
.title-box {
height: 110rpx;
padding-left: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.order-title {
font-size: 34rpx;
color: #ADB0B5;
line-height: 1;
position: relative;
}
.flag {
font-size: 12px;
color: #99A0AF;
vertical-align: middle;
}
.message {
font-size: 15px;
color: #222;
}
.price-box {
line-height: 1;
vertical-align: middle;
.unit {
color: #B60001;
font-size: 12px;
}
.price {
font-size: 40rpx;
color: #B60001;
margin-right: 20rpx;
}
}
}
.image-list {
margin-top: 20rpx;
display: flex;
box-sizing: border-box;
width: 100%;
font-size: 16px;
padding: 12px 15px;
.enclosure-text {
flex: none;
font-size: 14px;
color: #99A0AF;
}
.image {
// display: flex;
// flex-wrap: wrap;
.enclosure {
font-size: 14px;
color: #636872;
// margin-right: 50rpx;
word-break: break-all;
&+.enclosure {
margin-top: 20rpx;
}
}
}
}
.orderType-box {
background: #fff;
padding: 0 30rpx 30rpx;
.button {
height: 92rpx;
line-height: 92rpx;
color: #fff;
font-size: 14px;
border-radius: 0;
}
}
.btn-btm {
display: flex;
align-items: center;
justify-content: space-around;
padding: 0 30rpx;
}
.button {
&.red {
background-color: #DE0000;
}
&.orange {
background-color: #F36E03;
}
&.blue {
background-color: #B60001;
}
&.yellow {
background-color: #dfc803;
}
&.green {
background-color: #03d97d;
}
&::after {
border-radius: 0;
border: 0;
}
}
</style>
<template>
<view class="container" >
<uni-collapse ref="collapse">
<!-- 保证金审核 -->
<uni-collapse-item style="margin-top: 0;" name="message" :open="true">
<template v-slot:title>
<view class="title-box">
<text class="order-title">专场信息</text>
<text class="flag"></text>
</view>
</template>
<uni-list class="custom-uni-list">
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="专场名称"
:rightText="form.name"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="专场开始时间"
:rightText="form.specialStartTime"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="专场结束时间"
:rightText="form.specialEndTime"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="截止报名时间"
:rightText="form.signEndDate"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="是否允许中途报名"
:rightText="form.allowSign?'是':'否'"></uni-list-item>
</view>
</uni-list>
<view class="image-list " style="flex-flow: column">
<text class="enclosure-text">封面图片:</text>
<view class="image" style="width: 100%">
<image :src="imageUrl"></image>
</view>
</view>
</uni-collapse-item>
<!-- 集采商品清单 -->
<uni-collapse-item name="message" :open="true">
<template v-slot:title>
<view class="title-box">
<text class="order-title">店铺商品信息审核</text>
<text class="flag"></text>
</view>
</template>
<uni-list class="custom-uni-list" v-for="(item, index) in list" v-if="list.length>0">
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="商品编码"
:rightText="item.productCode"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="商品名称"
:rightText="item.productName"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="所属店铺"
:rightText="item.sellerName"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="库存数量"
:rightText="item.availableCount"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="厂家"
:rightText="item.manufacturer"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="起拍价格"
:rightText="item.startPrice"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="起拍时间"
:rightText="item.startDate"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="结束时间"
:rightText="item.endDate"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="保证金金额"
:rightText="item.amount"></uni-list-item>
</view>
<view class="list-item-bg">
<uni-list-item style="width: 100%;" :border="false" title="状态"
:rightText="item.statusName"></uni-list-item>
</view>
</uni-list>
<no-data :show="list.length==0"></no-data>
</uni-collapse-item>
</uni-collapse>
</view>
</template>
<script>
import {
auctionSpecialGet, auditBuyerMarginInfo,
centralizedPurchasingRegister,
centralizedPurchasingRegisterAudit,
depositConfirmSubmit,
downloadFileById, findAuctionMarginInfo, pageAudit
} from "@/config/api";
import serverConfig from "@/config/server_config";
export default {
data() {
return {
loading: false,
type:'',
form: {
imageId: ""
},
imageUrl:'',
list: [],
showTurndown: false,
formTurndown: {},
id: '',
};
},
onLoad(options) {
this.type = options.type
this.id = options.id
this.init(options.id)
},
methods: {
init(id) {
auctionSpecialGet(
id
).then(res => {
this.form = res.content;
this.$nextTick(()=>{
this.getImage(this.form.imageFileIds)
})
})
pageAudit(
{
specialId: id,
page: 1,
rows: 15
}
).then(res => {
this.list = res.content.content;
})
},
transStatus(item){
console.log(item)
switch (item) {
case 'auditPass':
return '审核通过'
break;
case 'notPass':
return '审核驳回'
break;
case 'confirm':
return '审核通过'
break;
default:
return '待审核'
break;
}
},
getImage(id){
downloadFileById(id).then(res => {
this.imageUrl = serverConfig.baseURL +"/"+ res.content[0].fullFilePath
console.log(this.form.imageUrl,res)
})
},
lookDeposit(data, index) {
console.log(data)
uni.previewImage({
current: index,
urls: [data],
})
},
confirmOrder(content, type, data,item) {
let _this = this;
uni.showModal({
title: this.$t('index.msg-notice-tip'),
content,
success: function(res) {
if (res.confirm) {
switch (type) {
case 'auditStatus':
_this.auditStatus(data,item)
break;
default:
break
}
}
}
});
},
auditStatus(flag,item) {
auditBuyerMarginInfo({
id: item.id,
auditStatus: flag ? 'confirm' : 'notPass',
refuseDesc: ''
}).then(res => {
uni.showToast({
title: `${flag ? '审核': '驳回'}成功!`,
icon: 'none'
});
this.list =[]
this.init(this.id)
})
},
}
}
</script>
<style lang="scss">
.container {
/deep/ .uni-collapse {
background-color: #F5F5F6;
}
/deep/ .uni-collapse-item {
margin-top: 10px;
background-color: #fff;
}
}
.title-box {
height: 110rpx;
padding-left: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.order-title {
font-size: 34rpx;
color: #ADB0B5;
line-height: 1;
position: relative;
}
.flag {
font-size: 12px;
color: #99A0AF;
vertical-align: middle;
}
.message {
font-size: 15px;
color: #222;
}
.price-box {
line-height: 1;
vertical-align: middle;
.unit {
color: #B60001;
font-size: 12px;
}
.price {
font-size: 40rpx;
color: #B60001;
margin-right: 20rpx;
}
}
}
.image-list {
margin-top: 20rpx;
display: flex;
box-sizing: border-box;
width: 100%;
font-size: 16px;
padding: 12px 15px;
.enclosure-text {
flex: none;
font-size: 14px;
color: #99A0AF;
}
.image {
// display: flex;
// flex-wrap: wrap;
.enclosure {
font-size: 14px;
color: #636872;
// margin-right: 50rpx;
word-break: break-all;
&+.enclosure {
margin-top: 20rpx;
}
}
}
}
.orderType-box {
background: #fff;
padding: 0 30rpx 30rpx;
.button {
height: 92rpx;
line-height: 92rpx;
color: #fff;
font-size: 14px;
border-radius: 0;
}
}
.btn-btm {
display: flex;
align-items: center;
justify-content: space-around;
padding: 0 30rpx;
}
.button {
&.red {
background-color: #DE0000;
}
&.orange {
background-color: #F36E03;
}
&.blue {
background-color: #B60001;
}
&.yellow {
background-color: #dfc803;
}
&.green {
background-color: #03d97d;
}
&::after {
border-radius: 0;
border: 0;
}
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论