Commit 81af981c authored by 阮藤's avatar 阮藤

相关接口对接完成

parent 8fa8b70b
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
// 删除委托单 // 删除委托单
del:{ del:{
url: `${base}/removeByIds`, url: `${base}/removeByIds`,
method: 'post' method: 'DELETE'
}, },
// 取消发布 // 取消发布
abolishByIds:{ abolishByIds:{
...@@ -41,6 +41,21 @@ export default { ...@@ -41,6 +41,21 @@ export default {
styleTreeList:{ styleTreeList:{
url: `${base}/styleTreeList`, url: `${base}/styleTreeList`,
method: 'get' method: 'get'
} },
// 委托单列表
entrustmentPage:{
url: `${base}/page`,
method: 'get'
},
// 委托单待寄样列表
noSampleOrder:{
url: `${base}/noSampleOrder`,
method: 'get'
},
// 我的面料列表
materialList:{
url: `${base}/materialList`,
method: 'get'
},
} }
} }
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
}, },
abolishByIds: { abolishByIds: {
url: '/gdep-plm/orderTicket/abolishByIds', url: '/gdep-plm/orderTicket/abolishByIds',
method: "get" method: "put"
}, },
} }
} }
export default {
data(){
return{
headerHeight: 0,
footerHeight: 0
}
},
methods:{
getHeaderHeight(){
this.$nextTick(() =>{
this.uGetRect("#header").then(res =>{
this.headerHeight = res.height;
})
})
},
getFooterHeight(){
this.$nextTick(() =>{
this.uGetRect("#footer").then(res =>{
this.footerHeight = res.height;
})
})
},
uGetRect(selector, all) {
return new Promise((resolve) => {
uni.createSelectorQuery()
.in(this)[all ? 'selectAll' : 'select'](selector)
.boundingClientRect((rect) => {
if (all && Array.isArray(rect) && rect.length) {
resolve(rect)
}
if (!all && rect) {
resolve(rect)
}
if(rect === null){
resolve({})
}
})
.exec()
})
},
},
mounted() {
this.getHeaderHeight();
this.getFooterHeight();
},
}
...@@ -6,20 +6,41 @@ ...@@ -6,20 +6,41 @@
<u-sticky offset-top="15"> <u-sticky offset-top="15">
<u-search class="" bg-color="#fff" border-color="#ececec" placeholder="请输入面料名称" :show-action="false" v-model="search"></u-search> <u-search class="" bg-color="#fff" border-color="#ececec" placeholder="请输入面料名称" :show-action="false" v-model="search"></u-search>
</u-sticky> </u-sticky>
<view><fabricTitle :tableData="table"></fabricTitle></view> <view>
<view class="u-m-t-30" v-for="item in fiabricList"><fabricTitle :item="item"></fabricTitle></view>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import fabricTitle from './components/fabricTitle.vue'; import fabricTitle from '@/components/hs-material-thumbnail/hs-material-thumbnail.vue';
export default { export default {
components: { fabricTitle }, components: { fabricTitle },
data() { data() {
return { return {
search: '', search: '',
table: [1, 2, 3, 4] fiabricList: []
}; };
},
onLoad() {
this.materialList();
},
methods: {
// 我的面料
materialList() {
this.$http('orderTicket.materialList', {
size: 4,
materialCode: '',
materialName: this.search
}).then(res => {
let { code, data } = res;
if (code == 200) {
this.fiabricList.concat(data);
// this.fiabricList = [1, 2];
}
});
}
} }
}; };
</script> </script>
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
</view> </view>
<!-- 按钮 --> <!-- 按钮 -->
<view class="home_btn"> <view class="home_btn">
<view class="" v-for="item in buts"> <view class="" v-for="item in buts" @click="goCli(item.url)">
<image class="img" :src="item.img" mode=""></image> <image class="hs-img-56" :src="item.img" mode=""></image>
<view class="u-m-t-8">{{ item.name }}</view> <view class="u-m-t-8">{{ item.name }}</view>
</view> </view>
</view> </view>
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
</view> </view>
<view class="home_con_fabric"> <view class="home_con_fabric">
<view class="home_con_content u-m-t-24" @click="detailFabric(item)" v-for="item in fiabricList"> <view class="home_con_content u-m-t-24" @click="detailFabric(item)" v-for="item in fiabricList">
<view class="home_con_content_font ov_hiden">{{ item.name }}</view> <image class="hs-img" :src="item.fileCode" mode=""></image>
<view class="home_con_content_font ov_hiden">{{ item.materialName }}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -77,36 +78,28 @@ export default { ...@@ -77,36 +78,28 @@ export default {
quantityNum: 0, quantityNum: 0,
exceptionNum: 0, exceptionNum: 0,
abolishIds: [], abolishIds: [],
fiabricList: [ // 我的面料
{ fiabricList: [],
name: '加厚荷兰绒绒布布料布布料布布料布'
},
{
name: '加厚荷兰绒绒布布料布布料布'
},
{
name: '加厚荷兰绒绒布布料布布料布'
},
{
name: '加厚荷兰绒绒布布料布'
}
],
buts: [ buts: [
{ {
name: '面料建模', name: '面料建模',
img: '../../static/images/home/fabricModeling@2x.png' img: '../../static/images/home/fabricModeling@2x.png',
url: ''
}, },
{ {
name: '款式委托', name: '款式委托',
img: '../../static/images/home/styleEntrustment@2x.png' img: '../../static/images/home/styleEntrustment@2x.png',
url: '/pages/home/styleEntrustment'
}, },
{ {
name: '检测委托', name: '检测委托',
img: '../../static/images/home/styleManageme@2x.png' img: '../../static/images/home/styleManageme@2x.png',
url: ''
}, },
{ {
name: '款式管理', name: '款式管理',
img: '../../static/images/home/testCommission@2x.png' img: '../../static/images/home/testCommission@2x.png',
url: ''
} }
] ]
}; };
...@@ -114,9 +107,11 @@ export default { ...@@ -114,9 +107,11 @@ export default {
onLoad() { onLoad() {
this.toBeSelectedQuantity(); this.toBeSelectedQuantity();
this.orderTicketExceptionNum(); this.orderTicketExceptionNum();
this.abolishByIds(); this.noSampleOrder();
this.materialList();
}, },
methods: { methods: {
// 选款总数
toBeSelectedQuantity() { toBeSelectedQuantity() {
this.$http('plm.toBeSelectedQuantity', {}).then(res => { this.$http('plm.toBeSelectedQuantity', {}).then(res => {
let { code, data } = res; let { code, data } = res;
...@@ -125,6 +120,7 @@ export default { ...@@ -125,6 +120,7 @@ export default {
} }
}); });
}, },
// 异常总数
orderTicketExceptionNum() { orderTicketExceptionNum() {
this.$http('plm.orderTicketExceptionNum', {}).then(res => { this.$http('plm.orderTicketExceptionNum', {}).then(res => {
let { code, data } = res; let { code, data } = res;
...@@ -133,14 +129,29 @@ export default { ...@@ -133,14 +129,29 @@ export default {
} }
}); });
}, },
abolishByIds() { // 寄样单总数
this.$http('plm.abolishByIds', {}).then(res => { noSampleOrder() {
this.$http('orderTicket.noSampleOrder', {}).then(res => {
let { code, data } = res; let { code, data } = res;
if (code == 200) { if (code == 200) {
this.abolishIds = data; this.abolishIds = data;
} }
}); });
}, },
// 我的面料
materialList() {
this.$http('orderTicket.materialList', {
size: 4,
materialCode: '',
materialName: ''
}).then(res => {
let { code, data } = res;
if (code == 200) {
this.fiabricList = data;
// this.fiabricList = [1,2];
}
});
},
searchCli() { searchCli() {
this.$Router.push('/pages/home/search'); this.$Router.push('/pages/home/search');
}, },
...@@ -155,6 +166,9 @@ export default { ...@@ -155,6 +166,9 @@ export default {
}, },
entrustmentCli() { entrustmentCli() {
this.$Router.push('/pages/home/styleEntrustment'); this.$Router.push('/pages/home/styleEntrustment');
},
goCli(url) {
this.$router.push(url);
} }
} }
}; };
...@@ -234,7 +248,7 @@ export default { ...@@ -234,7 +248,7 @@ export default {
height: 160rpx; height: 160rpx;
border-radius: 8rpx; border-radius: 8rpx;
overflow: hidden; overflow: hidden;
background-image: url(../../static/images/home/1@2x.png); // background-image: url(../../static/images/home/1@2x.png);
.home_con_content_font { .home_con_content_font {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
...@@ -275,10 +289,6 @@ export default { ...@@ -275,10 +289,6 @@ export default {
height: 50rpx; height: 50rpx;
border: 1rpx solid #fff; border: 1rpx solid #fff;
} }
.img {
width: 56rpx;
height: 56rpx;
}
.color_000 { .color_000 {
color: rgba(0, 0, 0, 0.2); color: rgba(0, 0, 0, 0.2);
} }
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<span class="u-font-28">所选面料</span> <span class="u-font-28">所选面料</span>
<span class="u-font-24 color_DDA973">(新建面料,已同步面料建模)</span> <span class="u-font-24 color_DDA973">(新建面料,已同步面料建模)</span>
</view> </view>
<fabricTitle :tableData="tableData"></fabricTitle> <fabricTitle :item="tableData"></fabricTitle>
</view> </view>
</view> </view>
</view> </view>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</template> </template>
<script> <script>
import fabricTitle from './components/fabricTitle.vue'; import fabricTitle from '@/components/hs-material-thumbnail/hs-material-thumbnail.vue';
export default { export default {
components: { fabricTitle }, components: { fabricTitle },
data() { data() {
...@@ -54,10 +54,19 @@ export default { ...@@ -54,10 +54,19 @@ export default {
total: 12, total: 12,
// 当前数 // 当前数
sum: 12, sum: 12,
tableData: [1] tableData: {}
}; };
}, },
onLoad(){
this.detail()
},
methods: { methods: {
detail(){
// this.$http('orderTicket.detail',1).then(res => {
// let { code,data } = res
// this.a = data
// })
},
previousCli() { previousCli() {
if (this.sum == 1) return; if (this.sum == 1) return;
this.sum == --this.sum; this.sum == --this.sum;
......
<template> <template>
<!-- 款式委托 --> <!-- 款式委托 -->
<view class="" style="position: relative;"> <!-- style="position: relative;" -->
<u-navbar :is-back="true" :background="{ backgroundColor: '#F5F5F5' }" title="款式委托"> <view class="">
<u-navbar :is-back="true" id="header" :background="{ backgroundColor: '#F5F5F5' }" title="款式委托">
<template v-slot:right> <template v-slot:right>
<view class="u-m-r-24"><u-icon name="search" size="38"></u-icon></view> <view class="u-m-r-24"><u-icon name="search" size="38"></u-icon></view>
</template> </template>
</u-navbar> </u-navbar>
<view class="bg_img"></view> <view class="bg_img"></view>
<view class="content"> <view class="content" :style="{ bottom: footerHeight + 'px', top: headerHeight + 'px' }">
<!-- 总数 --> <!-- 总数 -->
<view class="u-m-b-30 entrus_sum u-flex justify-around text-center"> <view class="u-m-b-30 entrus_sum u-flex justify-around text-center">
<view class="" @click="tabsCli(1)"> <view class="" @click="change(1)">
<view class="color_FA5353 u-font-48 hs-weight-500">123</view> <view class="color_FA5353 u-font-48 hs-weight-500">{{ exceptionNum }}</view>
<view class="color_AF8D66 u-font-28 hs-weight-500">异常</view> <view class="color_AF8D66 u-font-28 hs-weight-500">异常</view>
</view> </view>
<view class="split_line"></view> <view class="split_line"></view>
<view class="" @click="tabsCli(5)"> <view class="" @click="change(5)">
<view class="u-font-48 hs-weight-500">123</view> <view class="u-font-48 hs-weight-500">{{ abolishIds }}</view>
<view class="color_AF8D66 u-font-28 hs-weight-500">待寄样</view> <view class="color_AF8D66 u-font-28 hs-weight-500">待寄样</view>
</view> </view>
<view class="split_line"></view> <view class="split_line"></view>
<view class="" @click="tabsCli(6)"> <view class="" @click="change(6)">
<view class="u-font-48 hs-weight-500">123</view> <view class="u-font-48 hs-weight-500">{{ quantityNum }}</view>
<view class="color_AF8D66 u-font-28 hs-weight-500">待选款</view> <view class="color_AF8D66 u-font-28 hs-weight-500">待选款</view>
</view> </view>
</view> </view>
...@@ -32,40 +33,71 @@ ...@@ -32,40 +33,71 @@
<!-- list --> <!-- list -->
<view class="u-m-t-20 u-m-l-30 u-m-r-30 u-m-b-20"> <view class="u-m-t-20 u-m-l-30 u-m-r-30 u-m-b-20">
<!-- v-for --> <!-- v-for -->
<view class="u-m-b-20 posi_rela bd_rad1 u-p-30" v-for="(item, index) in 3" style="background: #fff;"> <view class="u-m-b-20 posi_rela bd_rad1 u-p-30" 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">加厚荷兰绒绒布布料</view> <view class="entrus_list_title u-font-32">{{ item.materialName }}</view>
<view class="u-font-28">2天无人接单</view> <view class="u-font-28">{{ item.status | filterStatus }}</view>
</view> </view>
<view class="dis_flex"> <view class="dis_flex">
<image style="width: 160rpx;height:160rpx;" src="@/static/images/home/1@2x.png" mode=""></image> <image style="width: 160rpx;height:160rpx;" :src="`${item.fileCode}`" 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">2021-12-01</span> <span class="u-m-l-20">{{ item.releaseDate }}</span>
</view> </view>
<view class=""> <view class="">
<span class="color_00004">截止日期</span> <span class="color_00004">截止日期</span>
<span class="u-m-l-20">2021-12-01</span> <span class="u-m-l-20">{{ item.expirationDate }}</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="text-right">
<view class="u-m-t-30 u-m-l-10 btn">拆单</view> <view v-if="item.status == 7" class="u-m-t-30 u-m-l-10 btn">寄样</view>
<view class="u-m-t-30 u-m-l-10 btn">拆单</view> <view v-if="item.status == 6" class="u-m-t-30 u-m-l-10 btn">撤回</view>
<view v-if="item.status == 4" @click="removeCli(item)" class="u-m-t-30 u-m-l-10 btn">删除</view>
<view v-if="item.status == 4" @click="dateilEnt(item, '编辑')" class="u-m-t-30 u-m-l-10 btn">编辑</view>
<view v-if="item.status == 5" @click="cancelCli(item)" class="u-m-t-30 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 == 2" class="u-m-t-30 u-m-l-10 btn">催单</view>
<view v-if="item.status == 1 || item.status == 5 || item.status == 6" @click="dateilEnt(item, '拆单')" class="u-m-t-30 u-m-l-10 btn">拆单</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!--底部按钮-->
<view class="footer" id="footer">
<view class="footer-btn">
<view class="custom-style-round-circle custom-style-btn custom-style">
<view class="custom-style-right" @click="submitData"><view class="title">新增委托</view></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-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
import dom from '@/mixins/dom.js';
export default { export default {
mixins: [dom],
data() { data() {
return { return {
modal: {
show: false,
title: ''
},
quantityNum: 0,
exceptionNum: 0,
abolishIds: 0,
pages: {
materialName: '',
size: 5
},
entrustmentId: '',
current: 0, current: 0,
entrustmentList: [],
list: [ list: [
{ {
name: '全部' name: '全部'
...@@ -94,12 +126,134 @@ export default { ...@@ -94,12 +126,134 @@ export default {
] ]
}; };
}, },
onLoad() {
this.entrustmentPage();
this.toBeSelectedQuantity();
this.orderTicketExceptionNum();
this.noSampleOrder();
},
// 上拉加载更多
onReachBottom() {
this.pages.size = this.pages.size + 5;
this.entrustmentPage();
},
filters: {
filterStatus(v) {
switch (v) {
case 1:
return '无人接单';
case 2:
return '延误';
case 3:
return '已待定超期';
case 4:
return '待发布';
case 5:
return '审核中';
case 6:
return '待接单';
case 7:
return '已接单';
case 8:
return '已寄样';
case 9:
return '待选款';
case 10:
return '已结束';
default:
return '';
}
}
},
methods: { methods: {
// 选款总数
toBeSelectedQuantity() {
this.$http('plm.toBeSelectedQuantity', {}).then(res => {
let { code, data } = res;
if (code == 200) {
this.quantityNum = data;
}
});
},
// 异常总数
orderTicketExceptionNum() {
this.$http('plm.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() {
let { materialName, size } = this.pages;
this.$http('orderTicket.entrustmentPage', {
materialName: materialName ? materialName : null,
status: this.current,
size: size
}).then(res => {
let { code, data } = res;
if (code === 200) {
this.entrustmentList = data;
}
});
},
change(index) { change(index) {
this.current = index; this.current = index;
this.pages.size = 5;
this.entrustmentPage();
},
// 删除操作
removeCli(item) {
this.modal.title = '删除后不可恢复,确定删除吗?';
this.modal.show = true;
this.entrustmentId = item.id;
},
confirm() {
this.delEntrustment();
}, },
tabsCli(v){ delEntrustment() {
this.current = v this.$http('orderTicket.del', [this.entrustmentId]).then(res => {
let { code, data } = res;
if (code === 200) {
this.pages.size = 5;
this.entrustmentList = [];
this.entrustmentPage();
this.$refs.uToast.show({
title: '删除成功'
});
}
});
},
// 取消发布
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({
title: '取消成功'
});
}
});
},
// 编辑 拆单
dateilEnt(item, val) {
if (val == '拆单') {
this.$Router.push('/pages/designCommissioned/splitItem?id=' + item.id);
} else if (val == '编辑') {
this.$Router.push('/pages/designCommissioned/addItem?id=' + item.id);
}
} }
} }
}; };
...@@ -122,6 +276,19 @@ export default { ...@@ -122,6 +276,19 @@ export default {
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.footer {
position: fixed;
width: 100%;
bottom: 0;
z-index: 998;
background: #fff;
box-shadow: 0px -4rpx 6rpx 0px rgba(178, 182, 214, 0.1);
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.footer-btn {
padding: 20rpx 60rpx;
}
}
.bg_img { .bg_img {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -133,6 +300,7 @@ export default { ...@@ -133,6 +300,7 @@ export default {
position: absolute; position: absolute;
top: 220rpx; top: 220rpx;
width: 100%; width: 100%;
overflow-y: auto;
} }
.entrus_sum { .entrus_sum {
height: 164rpx; height: 164rpx;
...@@ -204,4 +372,34 @@ export default { ...@@ -204,4 +372,34 @@ export default {
border-radius: 100rpx; border-radius: 100rpx;
} }
} }
@mixin vue-flex($direction: row) {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: $direction;
/* #endif */
}
.custom-style {
color: #fff;
height: 88rpx;
line-height: 88rpx;
@include vue-flex;
&-btn {
overflow: hidden;
}
&-round-circle {
border-radius: 100rpx;
}
/*background: #000;*/
.custom-style-left {
width: 240rpx;
background: #d6d6d6;
text-align: center;
}
.custom-style-right {
flex: 1;
background: rgba(0, 0, 0, 0.8);
text-align: center;
}
}
</style> </style>
.hs-position-relative{ .hs-position-relative{
position: relative; position: relative;
} }
.img{ .hs-img{
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment