Commit 1cc83710 authored by 阮藤's avatar 阮藤

相关页面编写 接口调整

parent df8604ea
......@@ -62,5 +62,13 @@ export default {
url: `${base}/materialDetail`,
method: 'get'
},
toBeSelectedQuantity: {
url: `${base}/toBeSelectedQuantity`,
method: "get"
},
orderTicketExceptionNum: {
url: `${base}/orderTicketExceptionNum`,
method: "get"
},
}
}
export default {
plm: {
toBeSelectedQuantity: {
url: '/gdep-plm/orderTicket/toBeSelectedQuantity',
method: "get"
},
orderTicketExceptionNum: {
url: '/gdep-plm/orderTicket/orderTicketExceptionNum',
method: "get"
},
abolishByIds: {
url: '/gdep-plm/orderTicket/abolishByIds',
method: "put"
},
}
}
......@@ -3,16 +3,14 @@
*/
import user from './apiList/user.js'
import auth from './apiList/auth.js'
import plm from './apiList/plm.js'
import color from './apiList/colors.js'
import orderTicket from './apiList/orderTicket.js'
// import goods from './apiList/goods.js'
// import base from './apiList/base.js'
export default {
...user,
...auth,
...color,
...orderTicket,
...plm
...user,
...auth,
...color,
...orderTicket
};
<template>
<!-- 搜索界面 -->
<view class="">
<u-navbar :is-back="true" :background="{ backgroundColor: '#F5F5F5' }" title="">
<view class="slot-wrap">
<view class="search-wrap">
<u-search
@change="changeCli"
@search="searchEng"
bg-color="#fff"
border-color="#d5aa7a"
placeholder="请输入名称"
:show-action="false"
v-model="value"
></u-search>
</view>
</view>
</u-navbar>
<!-- 列表 -->
<view class="home_con_order u-p-l-30 u-p-r-30">
<view class="u-m-t-30" @click="searchEng(item.materialName)" v-for="item in fiabricList">
<text>{{ item.materialName }}</text>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import home from '../mixin/index.js';
export default {
mixins: [home],
data() {
return {
value: '',
size: 10,
total: 0,
state: 1,
fiabricList: []
};
},
onLoad(option) {
this.state = option.state;
},
methods: {
filterSwitch() {
const val = this.state;
switch (val) {
case 1:
// 款式
this.entrustmentPage();
return;
case 2:
// 建模
return;
default:
// 款式
this.entrustmentPage();
return;
}
},
changeCli() {
this.size = 10;
this.filterSwitch();
},
searchEng(item) {
let data = item || this.value;
try {
uni.setStorageSync('styleSearch', data);
uni.navigateBack({
delta: 1
});
} catch (e) {
// error
}
},
// 款式委托
entrustmentPage() {
this.$http(
'orderTicket.entrustmentPage',
{
size: this.size,
materialCode: '',
status: 0,
materialName: this.value
},
'加载中...'
)
.then(res => {
let { code, data } = res;
if (code == 200) {
this.fiabricList = data.data;
this.total = data.total;
this.$refs.uToast.show({
title: '操作成功'
});
}
})
.catch(err => {
this.$refs.uToast.show({
title: '操作失败'
});
});
}
}
};
</script>
<style lang="scss" scoped>
.slot-wrap {
display: flex;
align-items: center;
flex: 1;
}
.search-wrap {
margin: 0 20rpx;
flex: 1;
}
</style>
......@@ -118,7 +118,7 @@ export default {
methods: {
// 选款总数
toBeSelectedQuantity() {
this.$http('plm.toBeSelectedQuantity', {}).then(res => {
this.$http('orderTicket.toBeSelectedQuantity', {}).then(res => {
let { code, data } = res;
if (code == 200) {
this.quantityNum = data;
......@@ -127,7 +127,7 @@ export default {
},
// 异常总数
orderTicketExceptionNum() {
this.$http('plm.orderTicketExceptionNum', {}).then(res => {
this.$http('orderTicket.orderTicketExceptionNum', {}).then(res => {
let { code, data } = res;
if (code == 200) {
this.exceptionNum = data;
......@@ -157,6 +157,7 @@ export default {
});
},
searchCli() {
// 搜索面料===1 搜索建模===2
this.$Router.push('/pages/home/search');
},
seeFabric() {
......
<template>
<!-- 款式委托 -->
<!-- 建模订单 -->
<view class="">
<view class="u-relative l_r_t_b" :style="{ height: 'calc(100vh - ' + footerHeight + 'px)' }">
<view class="bg_img" id="header">
<u-navbar :is-back="true" :border-bottom="false" :background="background" title-color="#000" title="建模订单">
<u-navbar :is-back="true" :border-bottom="false" :background="background" title-color="#000" title="">
<view class="u-flex u-row-center u-flex-1 hs-weight-600 u-font-36">
<text v-if="searchFlag" class="map-wrap-text">建模订单</text>
<u-search
v-if="!searchFlag"
class="u-m-r-24"
bg-color="#fff"
@click="searchCli"
:disabled="true"
border-color="#d5aa7a"
placeholder="请输入面料名称"
:show-action="false"
v-model="value"
></u-search>
</view>
<template v-slot:right>
<view class="u-m-r-24"><u-icon name="search" size="38"></u-icon></view>
<view v-if="searchFlag" @click="searchCli" class="u-m-r-24"><u-icon name="search" size="38"></u-icon></view>
</template>
</u-navbar>
<!-- 总数 -->
......@@ -94,6 +108,8 @@ export default {
mixins: [dom],
data() {
return {
value: '',
searchFlag: true,
loadStatus: 'loadmore',
offsetTop: 0,
enable: true,
......@@ -150,6 +166,13 @@ export default {
this.noSampleOrder();
},
onShow() {
// 获取查询条件
this.value = uni.getStorageSync('styleSearch') || '';
uni.removeStorageSync('styleSearch');
this.entrustmentPage();
this.toBeSelectedQuantity();
this.orderTicketExceptionNum();
this.noSampleOrder();
this.enable = true;
// #ifdef APP-PLUS
this.setOffestTop();
......@@ -230,7 +253,7 @@ export default {
},
// 选款总数
toBeSelectedQuantity() {
this.$http('plm.toBeSelectedQuantity', {}).then(res => {
this.$http('orderTicket.toBeSelectedQuantity', {}).then(res => {
let { code, data } = res;
if (code == 200) {
this.quantityNum = data;
......@@ -239,7 +262,7 @@ export default {
},
// 异常总数
orderTicketExceptionNum() {
this.$http('plm.orderTicketExceptionNum', {}).then(res => {
this.$http('orderTicket.orderTicketExceptionNum', {}).then(res => {
let { code, data } = res;
if (code == 200) {
this.exceptionNum = data;
......@@ -330,6 +353,11 @@ export default {
}
});
},
// 点击搜索按钮
searchCli() {
this.$Router.push('/pages/home/components/search?state=1');
this.searchFlag = false;
},
// 编辑 拆单
dateilEnt(item, val) {
if (val == '拆单') {
......
......@@ -3,9 +3,23 @@
<view class="">
<view class="u-relative l_r_t_b" :style="{ height: 'calc(100vh - ' + footerHeight + 'px)' }">
<view class="bg_img" id="header">
<u-navbar :is-back="true" :border-bottom="false" :background="background" title-color="#000" title="款式委托">
<u-navbar :is-back="true" :border-bottom="false" :background="background" title-color="#000" title="">
<view class="u-flex u-row-center u-flex-1 hs-weight-600 u-font-36">
<text v-if="searchFlag" class="map-wrap-text">款式委托</text>
<u-search
v-if="!searchFlag"
class="u-m-r-24"
bg-color="#fff"
@click='searchCli'
:disabled="true"
border-color="#d5aa7a"
placeholder="请输入面料名称"
:show-action="false"
v-model="value"
></u-search>
</view>
<template v-slot:right>
<view class="u-m-r-24"><u-icon name="search" size="38"></u-icon></view>
<view v-if="searchFlag" @click="searchCli" class="u-m-r-24"><u-icon name="search" size="38"></u-icon></view>
</template>
</u-navbar>
<!-- 总数 -->
......@@ -89,6 +103,8 @@ export default {
mixins: [dom],
data() {
return {
value: '',
searchFlag: true,
loadStatus: 'loadmore',
offsetTop: 0,
enable: true,
......@@ -145,6 +161,13 @@ export default {
this.noSampleOrder();
},
onShow() {
// 获取查询条件
this.value = uni.getStorageSync('styleSearch') || '';
uni.removeStorageSync('styleSearch');
this.entrustmentPage();
this.toBeSelectedQuantity();
this.orderTicketExceptionNum();
this.noSampleOrder();
this.enable = true;
// #ifdef APP-PLUS
this.setOffestTop();
......@@ -225,7 +248,7 @@ export default {
},
// 选款总数
toBeSelectedQuantity() {
this.$http('plm.toBeSelectedQuantity', {}).then(res => {
this.$http('orderTicket.toBeSelectedQuantity', {}).then(res => {
let { code, data } = res;
if (code == 200) {
this.quantityNum = data;
......@@ -234,7 +257,7 @@ export default {
},
// 异常总数
orderTicketExceptionNum() {
this.$http('plm.orderTicketExceptionNum', {}).then(res => {
this.$http('orderTicket.orderTicketExceptionNum', {}).then(res => {
let { code, data } = res;
if (code == 200) {
this.exceptionNum = data;
......@@ -325,12 +348,16 @@ export default {
}
});
},
// 点击搜索按钮
searchCli() {
this.$Router.push('/pages/home/components/search?state=1');
this.searchFlag = false;
},
// 编辑 拆单
dateilEnt(item, val) {
if (val == '拆单') {
this.$Router.push('/pages/designCommissioned/splitItem?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 == '选款') {
......@@ -465,4 +492,15 @@ export default {
border-radius: 100rpx;
}
}
.map-wrap {
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
}
.map-wrap-text {
padding: 0 6rpx;
}
</style>
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