Commit d8ac030d authored by 阮藤's avatar 阮藤

列表页面上传

parent 661ff65e
...@@ -14,6 +14,10 @@ export default { ...@@ -14,6 +14,10 @@ export default {
detail:{ detail:{
url: `${base}/detail`, url: `${base}/detail`,
method: "GET", method: "GET",
} },
reminders:{
url: `${base}/reminders`,
method: "post",
},
} }
} }
const url = "/gdep-plm"
export default {
plm: {
selectModelingTaskPage: {
url: url + "/modelingtask/selectModelingTaskPage",
method: "get",
},
}
}
...@@ -6,6 +6,7 @@ import auth from './apiList/auth.js' ...@@ -6,6 +6,7 @@ import auth from './apiList/auth.js'
import color from './apiList/colors.js' import color from './apiList/colors.js'
import orderTicket from './apiList/orderTicket.js' import orderTicket from './apiList/orderTicket.js'
import modeling from './apiList/modeling.js' import modeling from './apiList/modeling.js'
import plm from './apiList/plm.js'
// import goods from './apiList/goods.js' // import goods from './apiList/goods.js'
// import base from './apiList/base.js' // import base from './apiList/base.js'
...@@ -14,5 +15,6 @@ export default { ...@@ -14,5 +15,6 @@ export default {
...auth, ...auth,
...color, ...color,
...orderTicket, ...orderTicket,
...modeling ...modeling,
...plm
}; };
...@@ -44,45 +44,51 @@ ...@@ -44,45 +44,51 @@
</view> </view>
<!-- tabs --> <!-- tabs -->
<u-sticky :enable="enable" :offset-top="offsetTop" class="bd_rad" style="background: #fff;"> <u-sticky :enable="enable" :offset-top="offsetTop" class="bd_rad" style="background: #fff;">
<u-tabs :list="list" font-size="28" :show-bar="false" active-color="#AF8D66" :current="current" @change="change"></u-tabs> <u-tabs :list="list" font-size="28" :show-bar="false" active-color="#AF8D66" :current="currentTab" @change="change"></u-tabs>
</u-sticky> </u-sticky>
</view> </view>
<view class="content" :style="{ bottom: footerHeight + 'px', top: headerHeight + 'px' }"> <view class="content" :style="{ bottom: footerHeight + 'px', top: headerHeight + 'px' }">
<view v-if="!isEmpty" class="u-flex u-row-between u-p-t-24 u-p-b-24 u-p-l-30 u-p-r-30"> <view v-if="!isEmpty" class="u-flex u-row-between u-p-t-24 u-p-b-24 u-p-l-30 u-p-r-30">
<view class="">全部订单:共30单</view> <view class="">全部订单:共{{ total }}单</view>
<view class="">截止日期:2021-12-21</view> <view class="">截止日期:{{ dateTime }}</view>
</view>
<view v-if="!isEmpty" class="bg-fff color_FA5353 hs-weight-700 u-flex u-row-between u-p-t-24 u-p-b-24 u-p-l-30 u-p-r-30">
<view @click="change(5)">有订单超时未完成,请前往操作</view>
</view> </view>
<!-- list --> <!-- list -->
<view class="u-p-t-20 u-p-l-30 u-p-r-30 u-p-b-20"> <view class="u-p-t-20 u-p-l-30 u-p-r-30 u-p-b-20">
<!-- entrustmentList -->
<view v-if="!isEmpty" class="u-m-b-20 bd_rad1 u-p-30" @click="detaileCli(item)" v-for="item in entrustmentList" :key="item.id" style="background: #fff;"> <view v-if="!isEmpty" class="u-m-b-20 bd_rad1 u-p-30" @click="detaileCli(item)" v-for="item in entrustmentList" :key="item.id" style="background: #fff;">
<view class="u-m-b-30 u-flex justify-between"> <view class="u-m-b-30 u-flex justify-between">
<view class="entrus_list_title u-font-32">{{ item.materialName }}</view> <view class="entrus_list_title u-font-32">{{ item.materialName }}</view>
<view class="u-font-28">{{ item.status | filterStatus }}</view> <view class="u-font-28">{{ item.status | filterStatus }}</view>
</view> </view>
<view class="dis_flex"> <view class="dis_flex">
<image class="hs-img-160" :src="`${item.fileCode}`" mode=""></image> <image class="hs-img-160" :src="`${$IMG_URL}${item.pictureCode}`" mode=""></image>
<view class="u-m-l-20"> <view class="u-m-l-20">
<view class="u-m-b-10"> <view class="u-m-b-10">
<span class="color_00004">发布日期</span> <span class="color_00004">建模服务商</span>
<span class="u-m-l-20">{{ item.releaseDate }}</span> <span class="u-m-l-20">{{ item.enterpriseName }}</span>
</view> </view>
<view class=""> <view class="u-m-b-10">
<span class="color_00004">截止日期</span> <span class="color_00004">截止日期</span>
<span class="u-m-l-20">{{ item.expirationDate }}</span> <span class="u-m-l-20">{{ item.expirationDate.split(' ')[0] }}</span>
</view>
<view class="">
<span class="color_00004">项目价格</span>
<span class="u-m-l-20">{{ item.price }} 元</span>
</view> </view>
</view> </view>
</view> </view>
<view class="u-m-t-30 bd_split_line"></view> <view class="u-m-t-30 bd_split_line"></view>
<view class="text-right"> <view class="justify-between u-m-t-30 u-flex u-flex-nowrap">
<view v-if="item.status == 7" class="u-m-t-30 u-m-l-10 btn">寄样</view> <view class="color_FA5353">{{ item.oddStatus == 1 ? '两天无人接单' : '' }} {{ item.oddStatus == 2 ? '未及时完成' : '' }}</view>
<view v-if="item.status == 6" class="u-m-t-30 u-m-l-10 btn">撤回</view> <view>
<view v-if="item.status == 4" @click.stop="removeCli(item)" class="u-m-t-30 u-m-l-10 btn">删除</view> <view v-if="item.status == 1 || item.status == 2" @click="dateilEnt(item, '即刻发布')" class="u-m-l-10 btn">即刻发布</view>
<view v-if="item.status == 4" @click.stop="dateilEnt(item, '编辑')" class="u-m-t-30 u-m-l-10 btn">编辑</view> <view v-if="item.status == 3" class="u-m-l-10 btn">撤回</view>
<view v-if="item.status == 5" @click.stop="cancelCli(item)" class="u-m-t-30 u-m-l-10 btn">取消</view> <view v-if="item.status == 4" @click="dateilEnt(item, '马上寄送')" class="u-m-l-10 btn">马上寄送</view>
<view v-if="item.status == 3 || item.status == 9" class="u-m-t-30 u-m-l-10 btn">选款</view> <view v-if="item.status == 5 || item.status == 6" @click.stop="reminder(item.id)" class="u-m-l-10 btn">催单</view>
<view v-if="item.status == 2" class="u-m-t-30 u-m-l-10 btn">催单</view> <view v-if="item.status == 7" class="u-m-l-10 btn">前往审核</view>
<view v-if="item.status == 1 || item.status == 5 || item.status == 6" @click.stop="dateilEnt(item, '拆单')" class="u-m-t-30 u-m-l-10 btn">拆单</view> </view>
</view> </view>
</view> </view>
<!-- 加载更多 --> <!-- 加载更多 -->
...@@ -102,7 +108,7 @@ ...@@ -102,7 +108,7 @@
<u-button @click="dateilEnt" class="custom-style" shape="circle">面料委托建模</u-button> <u-button @click="dateilEnt" class="custom-style" shape="circle">面料委托建模</u-button>
</view> </view>
</view> </view>
<u-modal v-model="modal.show" :show-cancel-button="true" :content="modal.title" @cancel="modal.show = false" @confirm="confirm"></u-modal> <u-modal v-model="modal.show" :title="modal.title" :show-cancel-button="true" :content="modal.content" @cancel="modal.show = false" @confirm="confirm"></u-modal>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
...@@ -113,6 +119,9 @@ export default { ...@@ -113,6 +119,9 @@ export default {
mixins: [dom], mixins: [dom],
data() { data() {
return { return {
// 列表id
id: '',
dateTime: '', //当前时间
value: '', value: '',
searchFlag: true, searchFlag: true,
loadStatus: 'loadmore', loadStatus: 'loadmore',
...@@ -123,61 +132,63 @@ export default { ...@@ -123,61 +132,63 @@ export default {
background: { backgroundColor: 'rgba(245,245,245,0)' }, background: { backgroundColor: 'rgba(245,245,245,0)' },
modal: { modal: {
show: false, show: false,
content: '',
title: '' title: ''
}, },
quantityNum: 0, quantityNum: 0,
exceptionNum: 0, exceptionNum: 0,
abolishIds: 0, abolishIds: 0,
overtimeOrderNum: 0,
pages: { pages: {
materialName: '', materialName: '',
current: 1,
size: 5 size: 5
}, },
entrustmentId: '', currentTab: 0,
current: 0, status: '',
entrustmentList: [], entrustmentList: [],
total: 0, total: 0,
list: [ list: [
{ {
name: '全部' name: '全部',
status: ''
}, },
{ {
name: '异常' name: '异常',
status: 9
}, },
{ {
name: '待发布' name: '待发布',
status: 1
}, },
{ {
name: '待接单' name: '待接单',
status: 3
}, },
{ {
name: '待寄样' name: '待寄样',
status: 4
}, },
{ {
name: '建模中' name: '建模中',
status: 5
}, },
{ {
name: '待确认' name: '待确认',
status: 7
}, },
{ {
name: '完成' name: '已完成',
status: 8
} }
] ]
}; };
}, },
onLoad() {
this.entrustmentPage();
this.toBeSelectedQuantity();
this.orderTicketExceptionNum();
this.noSampleOrder();
},
onShow() { onShow() {
// 获取查询条件 // 获取查询条件
this.entrustmentFun();
this.value = uni.getStorageSync('styleSearch') || ''; this.value = uni.getStorageSync('styleSearch') || '';
uni.removeStorageSync('styleSearch'); uni.removeStorageSync('styleSearch');
this.entrustmentPage();
this.toBeSelectedQuantity();
this.orderTicketExceptionNum();
this.noSampleOrder();
this.enable = true; this.enable = true;
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.setOffestTop(); this.setOffestTop();
...@@ -187,16 +198,14 @@ export default { ...@@ -187,16 +198,14 @@ export default {
this.enable = false; this.enable = false;
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.pages.size = 5; this.pages.current = 1;
this.entrustmentPage(); this.entrustmentPage();
this.toBeSelectedQuantity();
this.orderTicketExceptionNum();
this.noSampleOrder();
}, },
// 上拉加载更多 // 上拉加载更多
onReachBottom() { onReachBottom() {
if (this.total > this.entrustmentList.length) { if (this.total > this.entrustmentList.length) {
this.pages.size = this.pages.size + 5; // this.pages.size = this.pages.size + 5;
this.pages.current = this.pages.current + 1;
this.entrustmentPage(); this.entrustmentPage();
} }
}, },
...@@ -224,25 +233,25 @@ export default { ...@@ -224,25 +233,25 @@ export default {
filterStatus(v) { filterStatus(v) {
switch (v) { switch (v) {
case 1: case 1:
return '无人接单'; return '待发布';
case 2: case 2:
return '延误'; return '任务待审批';
case 3: case 3:
return '已待定超期'; return '待接单';
case 4: case 4:
return '待发布'; return '待寄样';
case 5: case 5:
return '审核中'; return '建模中';
case 6: case 6:
return '待接单'; return '建模待审批';
case 7: case 7:
return '已接单'; return '待确认';
case 8: case 8:
return '已寄样'; return '已完成';
case 9: // case 9:
return '待选款'; // return '待选款';
case 10: // case 10:
return '已结束'; // return '已结束';
default: default:
return ''; return '';
} }
...@@ -256,41 +265,22 @@ export default { ...@@ -256,41 +265,22 @@ export default {
console.log(systemInfo, topPx); console.log(systemInfo, topPx);
this.offsetTop = topPx / (uni.upx2px(topPx) / topPx); // px转rpx this.offsetTop = topPx / (uni.upx2px(topPx) / topPx); // px转rpx
}, },
// 选款总数 DateYMD() {
toBeSelectedQuantity() { let year = new Date().getFullYear();
this.$http('orderTicket.toBeSelectedQuantity', {}).then(res => { let month = new Date().getMonth() + 1;
let { code, data } = res; let day = new Date().getDate();
if (code == 200) { return `${year}-${month}-${day}`;
this.quantityNum = data;
}
});
},
// 异常总数
orderTicketExceptionNum() {
this.$http('orderTicket.orderTicketExceptionNum', {}).then(res => {
let { code, data } = res;
if (code == 200) {
this.exceptionNum = data;
}
});
},
// 寄样单总数
noSampleOrder() {
this.$http('orderTicket.noSampleOrder', {}).then(res => {
let { code, data } = res;
if (code == 200) {
this.abolishIds = data.length;
}
});
}, },
entrustmentPage() { entrustmentPage() {
this.dateTime = this.DateYMD();
this.loadStatus = 'loading'; this.loadStatus = 'loading';
let { materialName, size } = this.pages; let { materialName, current, size } = this.pages;
this.$http( this.$http(
'orderTicket.entrustmentPage', 'plm.selectModelingTaskPage',
{ {
materialName: materialName ? materialName : null, materialName: materialName ? materialName : null,
status: this.current, status: this.status,
current: current,
size: size size: size
}, },
'加载中...' '加载中...'
...@@ -298,9 +288,13 @@ export default { ...@@ -298,9 +288,13 @@ export default {
.then(res => { .then(res => {
let { code, data } = res; let { code, data } = res;
if (code === 200) { if (code === 200) {
this.entrustmentList = data.data || []; this.entrustmentList = this.entrustmentList.concat(data.modelingTaskPageVOPage.records) || [];
this.total = data.total || 0; this.total = data.modelingTaskPageVOPage.total || 0;
this.loadStatus = this.entrustmentList.length < data.total ? 'loadmore' : 'nomore'; this.exceptionNum = data.numberOfAbnormalities; // 异常数量
this.abolishIds = data.numberOfSamplesToBeSent; // 待寄样数量
this.overtimeOrderNum = data.overtimeOrderNum; // 超时订单
this.quantityNum = data.quantityToBeConfirmed; // 待确认数量
this.loadStatus = this.entrustmentList.length < this.total ? 'loadmore' : 'nomore';
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '操作成功' title: '操作成功'
}); });
...@@ -315,45 +309,33 @@ export default { ...@@ -315,45 +309,33 @@ export default {
}); });
}, },
change(index) { change(index) {
this.current = index; this.currentTab = index;
this.pages.size = 5; this.status = this.list[index].status;
this.entrustmentFun();
},
entrustmentFun() {
this.pages.current = 1;
this.entrustmentList = [];
this.entrustmentPage(); this.entrustmentPage();
}, },
// 查看详情
detaileCli(item) { detaileCli(item) {
this.$Router.push('/pages/designCommissioned/item?id=' + item.id); this.$Router.push('/pages/modeling/addItem?id=' + item.id);
},
// 删除操作
removeCli(item) {
this.modal.title = '删除后不可恢复,确定删除吗?';
this.modal.show = true;
this.entrustmentId = item.id;
}, },
// 模态框点击确定按钮
confirm() { confirm() {
this.delEntrustment(); // this.delEntrustment();
}, this.$http('modeling.reminders', { id: this.id }).then(res => {
delEntrustment() { console.log(res);
this.$http('orderTicket.del', [this.entrustmentId]).then(res => {
let { code, data } = res; let { code, data } = res;
if (code === 200) { if (code === 200) {
this.pages.size = 5;
this.entrustmentList = [];
this.entrustmentPage();
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '删除成功' title: '操作成功'
}); });
} this.entrustmentFun();
}); } else {
},
// 取消发布
cancelCli(item) {
this.$http('orderTicket.abolishByIds', [item.id]).then(res => {
let { code, data } = res;
if (code === 200) {
this.pages.size = 5;
this.entrustmentList = [];
this.entrustmentPage();
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '取消成功' title: '操作失败'
}); });
} }
}); });
...@@ -363,18 +345,21 @@ export default { ...@@ -363,18 +345,21 @@ export default {
this.$Router.push('/pages/home/components/search?state=1'); this.$Router.push('/pages/home/components/search?state=1');
this.searchFlag = false; this.searchFlag = false;
}, },
// 催单
reminder(id) {
this.id = id;
this.modal.show = true;
this.modal.title = '催单';
this.modal.content = '提示对方以超过截止日期';
},
// 编辑 拆单 // 编辑 拆单
dateilEnt(item, val) { dateilEnt(item, val) {
if (val == '拆单') { if (val == '即刻发布') {
this.$Router.push('/pages/designCommissioned/splitItem?id=' + item.id); this.$Router.push(`/pages/modeling/addItem?id=${item.id}`);
} else if (val == '编辑') {
// &id=${item.id}
uni.setStorageSync('_item', item);
this.$Router.push(`/pages/designCommissioned/addItem?id=${item.id}&status=1`);
} else if (val == '选款') { } else if (val == '选款') {
// this.$Router.push(`/pages/designCommissioned/addItem?id=${item.id}&status=2`); // this.$Router.push(`/pages/designCommissioned/addItem?id=${item.id}&status=2`);
} else if (val == '寄样') { } else if (val == '马上寄送') {
this.$Router.push(`/pages/designCommissioned/addItem?id=${item.id}&status=3`); this.$Router.push(`/pages/designCommissioned/addItem?id=${item.id}`);
} else { } else {
this.$Router.push('/pages/designCommissioned/listSelectToAdd'); this.$Router.push('/pages/designCommissioned/listSelectToAdd');
} }
...@@ -389,6 +374,9 @@ export default { ...@@ -389,6 +374,9 @@ export default {
.color_FA5353 { .color_FA5353 {
color: #fa5353; color: #fa5353;
} }
.bg-fff {
background: #fff;
}
.color_00004 { .color_00004 {
color: rgba(0, 0, 0, 0.4); color: rgba(0, 0, 0, 0.4);
} }
...@@ -504,6 +492,12 @@ export default { ...@@ -504,6 +492,12 @@ export default {
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
.btn_top {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
}
.btn { .btn {
width: 160rpx; width: 160rpx;
height: 64rpx; height: 64rpx;
......
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