Commit 61cd1463 by zhangzhen

细节优化

parent f217b9bb
......@@ -251,4 +251,10 @@ export const getOrgListByFactory = (data) => {
let url = `/service/S_HPMT_SC05_15`
let d = setParamsData(data);
return http.post(url, d)
}
export const getSearchProjectList = (data) => {
let url = `/service/S_HPMT_002_12`
return http.post(url, data)
}
\ No newline at end of file
const CONFIG = {
// 开发环境配置
development: {
assetsPath: 'https://www.eis-paas.com', // 静态资源路径
// assetsPath: 'http://129.211.46.84:8085', // 静态资源路径
// assetsPath: 'https://www.eis-paas.com', // 静态资源路径
assetsPath: 'http://129.211.46.84:8085', // 静态资源路径
// baseUrl: 'http://10.24.1.97:8080/hp-smart', // 后台接口请求地址
// #ifdef MP
baseUrl:'http://129.211.46.84:8085',
......@@ -10,8 +10,8 @@ const CONFIG = {
// #ifndef MP
baseUrl:'/prod-api',
// #endif
hostUrl: 'https://www.eis-paas.com', // H5地址(前端运行地址)
// hostUrl: 'http://129.211.46.84:8085/hggp', // H5地址(前端运行地址)
// hostUrl: 'https://www.eis-paas.com', // H5地址(前端运行地址)
hostUrl: 'http://129.211.46.84:8085/hggp', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址
weixinAppId: '' ,// 微信公众号appid
codeHeadUrl:"",
......@@ -19,8 +19,10 @@ const CONFIG = {
},
// 生产环境配置
production: {
assetsPath: 'https://www.eis-paas.com', // 静态资源路径
// assetsPath: 'http://129.211.46.84:8085', // 静态资源路径-测试服
assetsPath: 'https://www.eis-paas.com', // 静态资源路径-正式服
baseUrl: '/hggp', // 后台接口请求地址
// hostUrl: 'http://129.211.46.84:8085', // H5地址(前端运行地址)
hostUrl: 'https://www.eis-paas.com', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址
weixinAppId: '', // 微信公众号appid
......
......@@ -9,6 +9,11 @@
<block slot="content">
<text class="text-white">生产任务</text>
</block>
<!-- <block slot="right">
<view class="margin-right text-xxl" @tap="onPopOpen">
<text class="cuIcon-filter" :class="searchStatus? 'text-green': 'text-white'"></text>
</view>
</block> -->
</cu-custom>
......@@ -150,6 +155,55 @@
</view>
<u-popup :show="show" mode="right" :closeOnClickOverlay="true" :zIndex="455" :safeAreaInsetBottom="true"
:safeAreaInsetTop="true" round="6" @close="onPopClose">
<view class="flex-col filter-box">
<view class="content-black" :style="{height:statusBarHeight+45+'px'}">
</view>
<view class="flex-between text-xxl">
<view class=""></view>
<text class="cuIcon-roundclose text-gray margin-right" @tap="onPopClose"></text>
</view>
<view v-if="!projValue || (projValue&& searchProjectList.length>1)" class="flex-col item">
<text class="text-title margin-bottom-sm">项目名称:</text>
<picker class="input-box" mode="selector" :range="searchProjectList" v-model="projValue" range-key="projName"
@change="onProjChange">
<view>
<text :class="projValue?'text-black':'text-gray'">{{searchProjectList[projValue].projName }}</text>
</view>
</picker>
</view>
<view v-if="!prdtValue || (prdtValue&& searchPrdtSpecList.length>1)" class="flex-col item">
<text class="text-title margin-bottom-sm">部件名称:</text>
<picker class="input-box" mode="selector" :range="searchPrdtSpecList" v-model="prdtValue" range-key="prdtName"
@change="onPrdtChange">
<view>
<text :class="prdtValue?'text-black':'text-gray'">{{searchPrdtSpecList[prdtValue].prdtName}}</text>
</view>
</picker>
</view>
<view v-if="!partValue || (partValue&& searchPartList.length>1)" class="flex-col item">
<text class="text-title margin-bottom-sm">零件名称:</text>
<picker class="input-box" mode="selector" :range="searchPartList" v-model="partValue" range-key="partName"
@change="onPartChange">
<view>
<text :class="partValue?'text-black':'text-gray'">{{searchPartList[partValue].partName}}</text>
</view>
</picker>
</view>
<view class="list-btn">
<button class="cu-btn bg-gray" @tap="onReset">重 置</button>
<button class="cu-btn bg-blue" @tap="onFilterConfirm">确 定</button>
</view>
</view>
</u-popup>
</view>
</template>
......@@ -158,9 +212,8 @@
toJsonData
} from "@/utils/tools.js";
import moment from "@/common/moment.js";
import { getParamsList,getList,getCount } from "@/api/product-order.js";
import { getProcessByCompanyCode } from "@/api/index.js";
import { getParamsList,getList,getCount,getSearchProjectList } from "@/api/product-order.js";
export default {
data() {
return {
......@@ -251,7 +304,23 @@
],
factoryEnum:{},
unCount: 0,
count: 0
count: 0,
searchStatus: false,
show:false,
projValue: 0,
searchProjectList: [{
projName: "请选择项目"
}],
prdtValue:0,
searchPrdtSpecList:[{
prdtName: "请选择部件"
}],
partValue:0,
searchPartList:[
{
partName:"请选择零件"
}
]
};
},
onLoad(option) {
......@@ -286,15 +355,13 @@
})
},
onLoading() {
getProcessByCompanyCode({
companyCode: uni.getStorageSync("")
}).then(res=>{
getParamsList().then(res=>{
console.log(res,9999)
if(res.data.__sys__.status === 0){
let list = toJsonData(res.data.__blocks__.processCode_block_id.rows,res.data.__blocks__.processCode_block_id.meta.columns).map(item=>{
if(res.data){
let list = res.data.map(item=>{
return {
label: item.textField,
value: item.valueField
label: item.companyName,
value: item.companyCode
}
})
this.factoryList = [...this.factoryList,...list];
......@@ -311,7 +378,7 @@
getList({
...this.queryData,
completeStatus:this.tabList[this.current].value,
processCode: this.factoryList[this.index].value
companyCode: this.factoryList[this.index].value
},this.pageData).then(res => {
uni.hideLoading();
let list = toJsonData(res.data.__blocks__.result.rows,res.data.__blocks__.result.meta.columns);
......@@ -346,6 +413,42 @@
uni.navigateTo({
url:`/pages/product-order/index?id=`+val.id
})
},
onReset() {
this.searchParams = {
projCode: "",
prdtCode: "",
partCode: ""
}
this.projValue = 0;
this.prdtValue = 0;
this.partValue = 0;
this.onPopClose();
this.queryData = {
...this.queryData,
...this.searchParams
}
this.searchStatus = !!this.projValue;
this.onStorageParams();
this.onGetList();
},
onPopClose() {
this.show = false;
},
onPopOpen() {
if(this.searchProjectList.length <= 1){
getSearchProjectList({
companyCode: this.factoryList[this.index].value
}).then(res => {
this.searchProjectList = [{
projName: "请选择项目"
}]
if (res.data.status === 1 && res.data.result && res.data.result.length) {
this.searchProjectList = [...this.searchProjectList, ...res.data.result];
}
})
}
this.show = true
}
}
}
......
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