Browse Source

修改参数和弹出框

master
lijuncheng 7 months ago
parent
commit
f22e43207f
  1. 72
      src/api/request2.js
  2. 2
      src/common/directory.js
  3. 19
      src/common/utils.js
  4. 73
      src/mycomponents/form/customerFrom.vue
  5. 23
      src/pages/foam/check.vue
  6. 91
      src/pages/foam/input.vue
  7. 80
      src/pages/plastics/check.vue
  8. 317
      src/pages/plastics/input.vue
  9. 10
      src/pages/setter/index.vue
  10. 8
      src/uni_modules/wz-select-popup/components/wz-select-popup/wz-list.vue
  11. 5
      src/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue

72
src/api/request2.js

@ -197,9 +197,9 @@ export function appCheckUpdate() {
}) })
} }
/** /**
* @param params获取原料信息 * @param params 泡沫获取信息
*/ */
export function getDeviceInfo(machineCode) { export function getFoamDeviceInfo(machineCode) {
return request({ return request({
url: baseApi + "/MachineClass/Get?MachineCode="+machineCode, url: baseApi + "/MachineClass/Get?MachineCode="+machineCode,
method: "get", method: "get",
@ -208,23 +208,45 @@ export function getDeviceInfo(machineCode) {
} }
/** /**
* @param params获取计划单号 * @param params 注塑获取信息
*/ */
export function getPlaneNumberList(params) { export function getPlasticsDeviceInfo(machineCode) {
return request({ return request({
url: baseApi + "/system/captcha/captchaImage", url: baseApi + "/MachineClass/GZhuSuItem?Machine="+machineCode,
method: "get", method: "get",
data: params, data: {},
});
}
/**
* @param params获取泡沫生产计划
*/
export function getFoamPlaneNumberList() {
return request({
url: baseApi + "/Plan/GetList?Type=paomo",
method: "get",
data: {},
});
}
/**
* @param params获取注塑生产计划
*/
export function getPlasticsPlaneNumberList() {
return request({
url: baseApi + "/Plan/GetList?Type=paomo",
method: "get",
data: {},
}); });
} }
/** /**
* @param params获取原料信息 * @param params获取原料信息
*/ */
export function getMaterialLists(params) { export function getMaterialLists() {
return request({ return request({
url: baseApi + "/system/captcha/captchaImage", url: baseApi + "/Ware/GetTypeList",
method: "get", method: "get",
data: params, data: {},
}); });
} }
/** /**
@ -249,6 +271,28 @@ export function foamCheckSubmit(params) {
}); });
} }
/**
* @param params 原料投入泡沫提交
*/
export function foamInputSubmit(params) {
return request({
url: baseApi + "/MachineClass/Insert",
method: "post",
data: params,
});
}
/**
* @param params 原料投入注塑提交
*/
export function plasticsInputSubmit(params) {
return request({
url: baseApi + "/MachineClass/Insert",
method: "post",
data: params,
});
}
/** /**
* @param params 获取料筒号 * @param params 获取料筒号
*/ */
@ -272,13 +316,13 @@ export function getItemCode(code) {
} }
/** /**
* @param params 泡沫投入提交 * @param params 查询料筒号与物料号是否匹配
*/ */
export function foamInputSubmit(params) { export function checkItemCodeByBucket(BucketCode,itemCode) {
return request({ return request({
url: baseApi + "/system/captcha/captchaImage", url: baseApi + "/WareHouse/IsPass?BucketCode="+BucketCode+"&RawMaterial="+itemCode,
method: "post", method: "get",
data: params, data: {},
}); });
} }

2
src/common/directory.js

@ -568,5 +568,3 @@ export function getPackUnitName(value) {
return resultInfo return resultInfo
} }
locationAreaTypeList

19
src/common/utils.js

@ -0,0 +1,19 @@
//提示是否消息
export function showConfirmMsg(title, content, callback) {
uni.showModal({
title: title,
cancelText: '否',
confirmText: '是',
content: content,
customStyle: {
content: 'color: red;' // 这里设置对话框内容的颜色为红色
},
success: function(res) {
if (res.confirm) {
callback(true);
} else {
callback(false);
}
}
})
}

73
src/mycomponents/form/customerFrom.vue

@ -186,6 +186,9 @@
import { import {
deepCopyData deepCopyData
} from "@/common/basic.js" } from "@/common/basic.js"
import {
showConfirmMsg
} from "@/common/utils.js"
export default { export default {
components: { components: {
@ -286,18 +289,19 @@
submit(callBack) { submit(callBack) {
try { try {
var hintResult=""
for (var i = 0; i < this.formData.length; i++) { for (var i = 0; i < this.formData.length; i++) {
var item = this.formData[i]; var item = this.formData[i];
var hintIndex = i + 1 var hintIndex = i + 1
if (item.Type == 1) { if (item.Type == 1) {
if (item.SelectName == "") { if (item.SelectName == "") {
var hint = hintIndex + ".点检内容 : " + item.Content; var hint ="【"+hintIndex + ".点检内容 : " + item.Content;
throw new Error(hint) throw new Error(hint)
} }
} else if (item.Type == 2) { } else if (item.Type == 2) {
// //
if (item.SelectName == "") { if (item.SelectName == "") {
var hint = hintIndex + ".点检内容 : " + item.Content; var hint = "【"+hintIndex + ".点检内容 : "+ item.Content;
throw new Error(hint) throw new Error(hint)
} }
// //
@ -305,38 +309,41 @@
if (!this.isWithinInterval(item.SelectName, item.putMachine[0].Limit, item if (!this.isWithinInterval(item.SelectName, item.putMachine[0].Limit, item
.putMachine[0] .putMachine[0]
.Floor)) { .Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + var hint = "【"+hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
"】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间" "】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间"
throw new Error(hint) // throw new Error(hint)
hintResult=hintResult+"\n"+hint;
} }
} }
} else if (item.Type == 3) { } else if (item.Type == 3) {
if (item.SelectName == "") { if (item.SelectName == "") {
if (item.putMachine[0].SelectName == "") { if (item.putMachine[0].SelectName == "") {
var hint = hintIndex + ".点检内容 : " + item.Content; var hint = "【"+hintIndex + ".点检内容 : "+ item.Content;
throw new Error(hint) throw new Error(hint)
} else { } else {
if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit, if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit,
item item
.putMachine[0] .putMachine[0]
.Floor)) { .Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.putMachine[0].SelectName + var hint ="【"+hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.putMachine[0].SelectName +
"】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间" "】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间"
throw new Error(hint) // throw new Error(hint)
hintResult=hintResult+"\n"+hint;
} }
} }
if (item.putMachine[1].SelectName == "") { if (item.putMachine[1].SelectName == "") {
var hint = hintIndex + ".点检内容 : " + item.Content; var hint = "【"+hintIndex + ".点检内容 : "+ item.Content;
throw new Error(hint) throw new Error(hint)
} else { } else {
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit, if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit,
item item
.putMachine[1] .putMachine[1]
.Floor)) { .Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.putMachine[1].SelectName + var hint = "【"+hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.putMachine[1].SelectName +
"】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间" "】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间"
throw new Error(hint) // throw new Error(hint)
hintResult=hintResult+"\n"+hint;
} }
} }
@ -347,29 +354,60 @@
item item
.putMachine[0] .putMachine[0]
.Floor)) { .Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + var hint = "【"+hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
"】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间" "】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间"
throw new Error(hint) // throw new Error(hint)
hintResult=hintResult+"\n"+hint;
} }
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit, if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit,
item item
.putMachine[1] .putMachine[1]
.Floor)) { .Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + var hint = "【"+hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
"】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间" "】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间"
throw new Error(hint) // throw new Error(hint)
hintResult=hintResult+"\n"+hint;
} }
} }
} }
}else if(item.Type == 4){ }else if(item.Type == 4){
if (item.SelectName == "") { if (item.SelectName == "") {
var hint = hintIndex + ".点检内容 : " + item.Content; var hint = "【"+hintIndex + ".点检内容 : " + item.Content;
throw new Error(hint) throw new Error(hint)
} }
} }
} }
if(hintResult.length>0){
showConfirmMsg("是否提交?",hintResult,callback=>{
if(callback){
this.formData.forEach(res => {
if(res.SelectName){
if (res.SelectName.includes("班")) {
var value = this.dataClassList.filter(item => item.name == res.SelectName)
if (value.length > 0) {
res.SelectValue = value[0].value
} else {
res.SelectValue = ""
}
} else {
var value = this.dataList.filter(item => item.name == res.SelectName)
if (value.length > 0) {
res.SelectValue = value[0].value
} else {
res.SelectValue = res.SelectName
}
}
}
})
callBack(this.formData)
}
})
return;
}
this.formData.forEach(res => { this.formData.forEach(res => {
if(res.SelectName){ if(res.SelectName){
if (res.SelectName.includes("班")) { if (res.SelectName.includes("班")) {
@ -420,7 +458,10 @@
// title: title, // title: title,
// Content: hint // Content: hint
// }) // })
this.$refs.comMessage.showMessage("提示", hint) // this.$refs.comMessage.showMessage("", hint)
showConfirmMsg("提示",hint,callback=>{
})
}, },
isNumber(val) { isNumber(val) {

23
src/pages/foam/check.vue

@ -87,10 +87,9 @@
deepCopyData deepCopyData
} from "@/common/basic.js" } from "@/common/basic.js"
import { import {
getPlaneNumberList,
getMaterialLists, getMaterialLists,
foamCheckSubmit, foamCheckSubmit,
getDeviceInfo getFoamDeviceInfo
} from '@/api/request2.js'; } from '@/api/request2.js';
export default { export default {
components: { components: {
@ -242,11 +241,10 @@
title: "加载中", title: "加载中",
mask: true mask: true
}) })
getDeviceInfo(result).then(res => { getFoamDeviceInfo(result).then(res => {
uni.hideLoading() uni.hideLoading()
this.deviceCode = result; this.deviceCode = result;
console.log(result) console.log(result)
this.closeScanPopup();
var groupSelect = { var groupSelect = {
Type: "4", Type: "4",
Content: "选择班组", Content: "选择班组",
@ -255,7 +253,7 @@
} }
// this.dataList = this.formData // this.dataList = this.formData
this.dataList = res.Result; this.dataList = res.Result;
this.dataList.push(groupSelect) this.dataList.unshift(groupSelect)
this.deviceName=this.dataList[0].Name; this.deviceName=this.dataList[0].Name;
this.dateTime = getCurrDateTime() this.dateTime = getCurrDateTime()
@ -264,14 +262,6 @@
uni.hideLoading() uni.hideLoading()
this.showMessage(error) this.showMessage(error)
}) })
// this.deviceCode = result;
// this.deviceName = ""
// console.log(result)
// this.reset();
// this.closeScanPopup();
// this.dataList = this.formData;
// this.dateTime = getCurrDateTime()
}, },
submit() { submit() {
@ -346,12 +336,11 @@
title: "加载中", title: "加载中",
mask: true mask: true
}) })
getDeviceInfo(data).then(res => { getFoamDeviceInfo(data).then(res => {
uni.hideLoading() uni.hideLoading()
this.deviceCode = data; this.deviceCode = data;
this.deviceCheckCode = data; this.deviceCheckCode = data;
console.log(data) console.log(data)
this.closeScanPopup();
var groupSelect = { var groupSelect = {
Type: "4", Type: "4",
Content: "选择班组", Content: "选择班组",
@ -359,8 +348,8 @@
SelectValue: "", SelectValue: "",
} }
this.dataList = res.Result; this.dataList = res.Result;
this.dataList.push(groupSelect) this.dataList.unshift(groupSelect)
this.deviceName=this.dataList[0].Name; this.deviceName=this.dataList[1].Name;
this.dateTime = getCurrDateTime() this.dateTime = getCurrDateTime()
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()

91
src/pages/foam/input.vue

@ -45,7 +45,7 @@
<view class="" style="width: 80%;"> <view class="" style="width: 80%;">
<!-- <input id='inputSelect' class="input" v-model="materialName" @focus="render._inputFocus" /> --> <!-- <input id='inputSelect' class="input" v-model="materialName" @focus="render._inputFocus" /> -->
<!-- <input id='inputSelect' class="input" v-model="materialName" @focus="render._inputFocus" /> --> <!-- <input id='inputSelect' class="input" v-model="materialName" @focus="render._inputFocus" /> -->
<uni-easyinput class="" style="margin-left: 10rpx; margin-right: 10rpx;" trim="all" v-model="materialName"></uni-easyinput> <uni-easyinput class="" disabled style="margin-left: 10rpx; margin-right: 10rpx;" trim="all" v-model="materialName"></uni-easyinput>
</view> </view>
<view class="uni-flex u-col-center" style="width: 20%; margin-left: 10rpx; "> <view class="uni-flex u-col-center" style="width: 20%; margin-left: 10rpx; ">
<button type="primary" size="mini" @click="showMaterialSelect">原料</button> <button type="primary" size="mini" @click="showMaterialSelect">原料</button>
@ -65,8 +65,6 @@
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -83,7 +81,7 @@
</view> </view>
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal> <winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal>
<wz-select-popup ref="selectPopup" title="选择计划单号" @select="select" /> <wz-select-popup ref="selectPopup" title="选择计划单号" @select="selectPlan" />
<wz-select-popup ref="selectPopupMaterial" title="选择原料" @select="selectMaterial" /> <wz-select-popup ref="selectPopupMaterial" title="选择原料" @select="selectMaterial" />
<showModal ref="comMessage"></showModal> <showModal ref="comMessage"></showModal>
@ -108,7 +106,7 @@
getMaterialList getMaterialList
} from "./mock.js" } from "./mock.js"
import { import {
getPlaneNumberList, getFoamPlaneNumberList,
getMaterialLists, getMaterialLists,
foamInputSubmit foamInputSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
@ -157,7 +155,7 @@
console.log(event.detail); console.log(event.detail);
}, },
submit() { submit() {
if (this.planNumber == "123") { if (this.planNumber == "") {
this.showMessage("请选择计划单号") this.showMessage("请选择计划单号")
return return
} }
@ -177,7 +175,7 @@
planNumber: this.planNumber, planNumber: this.planNumber,
materialName: this.materialName, materialName: this.materialName,
materialQty: this.materialQty, materialQty: this.materialQty,
UserName:this.$store.state.user.id, id:this.$store.state.user.id,
createTime:getCurrDateTime(), createTime:getCurrDateTime(),
} }
console.log("提交", JSON.stringify(param)) console.log("提交", JSON.stringify(param))
@ -204,11 +202,13 @@
title: "加载中", title: "加载中",
mask: true mask: true
}) })
getPlaneNumberList().then(res => { getFoamPlaneNumberList().then(res => {
var list = [];
list =res.Result;
uni.hideLoading() uni.hideLoading()
this.$refs.selectPopup.open({ this.$refs.selectPopup.open({
mode: 'radio', //radio checkbox mode: 'radio', //radio checkbox
dataList: getDataList(), //dataList使proxyConfig dataList: list, //dataList使proxyConfig
// selected: this.userForm.values, // // selected: this.userForm.values, //
// proxyConfig: { // // proxyConfig: { //
// reqFun: this.reqGetList, // // reqFun: this.reqGetList, //
@ -218,69 +218,36 @@
type: 'local', //local | remote type: 'local', //local | remote
}, },
fields: { fields: {
label: 'name', label: 'PLAN_NO',
value: 'code' value: 'SHIFT_CODE'
} }
}) })
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage(error) this.showMessage(error)
}) })
// this.$refs.selectPopup.open({
// mode: 'radio', //radio checkbox
// dataList: getDataList(), //dataList使proxyConfig
// // selected: this.userForm.values, //
// // proxyConfig: { //
// // reqFun: this.reqGetList, //
// // localPaging: false //
// // },
// search: {
// type: 'local', //local | remote
// },
// fields: {
// label: 'name',
// value: 'code'
// }
// })
}, },
select(mode, data) { selectPlan(mode, data) {
this.planNumber = data.code this.planNumber = data.PLAN_NO
this.planName = data.name this.planName = data.SHIFT_CODE
console.log(mode) console.log(mode)
console.log(data) console.log(data)
}, },
showMaterialSelect() { showMaterialSelect() {
// getMaterialLists().then(res=>{ uni.showLoading({
// uni.hideLoading() title: "加载中",
// var dataList =getMaterialList(); mask: true
// this.$refs.selectPopupMaterial.open({ })
// mode: 'radio', //radio checkbox getMaterialLists().then(res => {
// dataList: dataList, //dataList使proxyConfig var list = [];
// // selected: this.userForm.values, // list =res.Result;
// // proxyConfig: { // uni.hideLoading()
// // reqFun: this.reqGetList, //
// // localPaging: false //
// // },
// search: {
// type: 'local', //local | remote
// },
// fields: {
// label: 'name',
// value: 'code'
// }
// })
// }).catch(error=>{
// uni.hideLoading()
// this.showMessage(error)
// })
this.$refs.selectPopupMaterial.open({ this.$refs.selectPopupMaterial.open({
mode: 'radio', //radio checkbox mode: 'radio', //radio checkbox
dataList: this.materialList, //dataList使proxyConfig dataList: list, //dataList使proxyConfig
// selected: this.userForm.values, // // selected: this.userForm.values, //
// proxyConfig: { // // proxyConfig: { //
// reqFun: this.reqGetList, // // reqFun: this.reqGetList, //
@ -290,14 +257,20 @@
type: 'local', //local | remote type: 'local', //local | remote
}, },
fields: { fields: {
label: 'name', label: 'Name',
value: 'code' value: 'Code'
} }
}) })
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
}, },
selectMaterial(mode, data) { selectMaterial(mode, data) {
this.materialName = data.name this.materialName = data.Name
this.materialCode = data.Code
this.$refs.inputQty.focused = true this.$refs.inputQty.focused = true
console.log("selectPopupMaterial") console.log("selectPopupMaterial")
}, },

80
src/pages/plastics/check.vue

@ -30,7 +30,7 @@
设备编号: 设备编号:
</view> </view>
<uni-easyinput <uni-easyinput
class="uni-mt-5" class=""
trim="all" trim="all"
ref="inputDevice" ref="inputDevice"
v-model="deviceCode" v-model="deviceCode"
@ -50,8 +50,6 @@
</view> </view>
<view class="" style="width: 100%;background-color: gray;height: 2rpx; margin-top: 10rpx;" /> <view class="" style="width: 100%;background-color: gray;height: 2rpx; margin-top: 10rpx;" />
</view> </view>
@ -66,7 +64,7 @@
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<button class="btn_single_reset" hover-class="btn_single_after" @click="reset">重置</button> <button class="btn_single_reset" hover-class="btn_single_after" @click="clearData">清空</button>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="submit">提交</button>
@ -89,10 +87,8 @@
deepCopyData deepCopyData
} from "@/common/basic.js" } from "@/common/basic.js"
import { import {
getPlaneNumberList,
getMaterialLists,
foamCheckSubmit, foamCheckSubmit,
getDeviceInfo getPlasticsDeviceInfo
} from '@/api/request2.js'; } from '@/api/request2.js';
export default { export default {
components: { components: {
@ -244,11 +240,10 @@
title: "加载中", title: "加载中",
mask: true mask: true
}) })
getDeviceInfo(result).then(res => { getPlasticsDeviceInfo(result).then(res => {
uni.hideLoading() uni.hideLoading()
this.deviceCode = result; this.deviceCode = result;
console.log(result) console.log(result)
this.reset();
this.closeScanPopup(); this.closeScanPopup();
var groupSelect = { var groupSelect = {
Type: "4", Type: "4",
@ -259,31 +254,14 @@
// this.dataList = this.formData // this.dataList = this.formData
this.dataList = res.Result; this.dataList = res.Result;
this.dataList.push(groupSelect) this.dataList.push(groupSelect)
this.dataList.forEach(res=>{
res.SelectName=""
res.SelectValue=""
if(res.putMachine){
res.putMachine.forEach(item=>{
item.SelectName=""
item.SelectValue=""
})
}
})
this.deviceName=this.dataList[0].Name; this.deviceName=this.dataList[0].Name;
this.dateTime = getCurrDateTime() this.dateTime = getCurrDateTime()
this.worker = this.$store.state.user.name
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage(error) this.showMessage(error)
}) })
// this.deviceCode = result;
// this.deviceName = ""
// console.log(result)
// this.reset();
// this.closeScanPopup();
// this.dataList = this.formData;
// this.dateTime = getCurrDateTime()
}, },
submit() { submit() {
@ -302,33 +280,34 @@
} }
}) })
var commitData={ var commitData={
LoginUserID:this.$store.state.user.id, id:this.$store.state.user.id,
UserName:this.$store.state.user.name,
createTime:getCurrDateTime(), createTime:getCurrDateTime(),
groupName:groupName, groupName:groupName,
groupValue:groupValue, groupValue:groupValue,
dataList:data dataList:data
} }
var param = commitData
console.log("提交", JSON.stringify(param))
// foamCheckSubmit(param).then(res=>{
// uni.hideLoading()
// this.showMessage("")
// this.clearData()
// }).catch(error=>{
// uni.hideLoading()
// this.showMessage(error)
// })
console.log("提交", JSON.stringify(commitData))
foamCheckSubmit(commitData).then(res=>{
uni.hideLoading()
this.showMessage("提交成功")
this.clearData()
}).catch(error=>{
uni.hideLoading()
this.showMessage(error)
})
}) })
}, },
clearData() { clearData() {
this.deviceCode = "" this.deviceCode = ""
this.deviceName="";
this.dateTime ="";
this.dateTime = "", this.dateTime = "",
this.deviceCode = "", this.deviceCode = "",
this.deviceName = "", this.deviceName = "",
this.reset(); this.worker=""
this.dataList=[]
// this.reset();
}, },
reset() { reset() {
this.$refs.customerFrom.reset() this.$refs.customerFrom.reset()
@ -357,12 +336,11 @@
title: "加载中", title: "加载中",
mask: true mask: true
}) })
getDeviceInfo(data).then(res => { getPlasticsDeviceInfo(data).then(res => {
uni.hideLoading() uni.hideLoading()
this.deviceCode = data; this.deviceCode = data;
this.deviceCheckCode = data; this.deviceCheckCode = data;
console.log(data) console.log(data)
this.reset();
this.closeScanPopup(); this.closeScanPopup();
var groupSelect = { var groupSelect = {
Type: "4", Type: "4",
@ -370,21 +348,9 @@
SelectName: "", SelectName: "",
SelectValue: "", SelectValue: "",
} }
// this.dataList = this.formData
this.dataList = res.Result; this.dataList = res.Result;
this.dataList.push(groupSelect) this.dataList.unshift(groupSelect)
this.dataList.forEach(res=>{ this.deviceName=this.dataList[1].Name;
res.SelectName=""
res.SelectValue=""
if(res.putMachine){
res.putMachine.forEach(item=>{
item.SelectName=""
item.SelectValue=""
})
}
})
this.deviceName=this.dataList[0].Name;
this.dateTime = getCurrDateTime() this.dateTime = getCurrDateTime()
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()

317
src/pages/plastics/input.vue

@ -4,7 +4,7 @@
style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;"> style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;">
<!-- <view class="flex u-col-center space-between"> <!-- <view class="flex u-col-center space-between">
<view class="" style="font-size: 35rpx;"> <view class="" style="font-size: 35rpx;">
计划单号 : {{planCode}} 生产计划 : {{planNumber}}
<text v-if="planName!=''">({{planName}})</text> <text v-if="planName!=''">({{planName}})</text>
</view> </view>
<view class=""> <view class="">
@ -23,7 +23,7 @@
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<view class="" style="width: 75%;"> <view class="" style="width: 75%;">
<uni-easyinput disabled trim="all" v-model="planCode"></uni-easyinput> <uni-easyinput disabled trim="all" v-model="planNumber"></uni-easyinput>
</view> </view>
<view class="uni-flex" style="width: 25%; align-items: center;"> <view class="uni-flex" style="width: 25%; align-items: center;">
<button type="primary" size="mini" @click="showPlanSelect">选择</button> <button type="primary" size="mini" @click="showPlanSelect">选择</button>
@ -36,10 +36,8 @@
</uni-section> </uni-section>
<view class="uni-flex"> <view class="uni-flex">
<uni-easyinput <uni-easyinput @clear="bucketClear" ref="inputBucketCode" class="" trim="all"
@clear="bucketClear" v-model="bucketCode" @confirm="onConfirmBucketCode"></uni-easyinput>
ref="inputBucketCode" class="" trim="all" v-model="bucketCode"
@confirm="onConfirmBucketCode" ></uni-easyinput>
</view> </view>
</view> </view>
@ -49,11 +47,8 @@
type="line"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<uni-easyinput <uni-easyinput ref="inputItemCode" @clear="itemClear" class="" trim="all" v-model="itemCode"
ref="inputItemCode" @confirm="onConfirmItemCode"></uni-easyinput>
@clear="itemClear"
class="" trim="all" v-model="itemCode"
@confirm="onConfirmItemCode" ></uni-easyinput>
</view> </view>
</view> </view>
<view class="uni-flex uni-column " style="margin: 10rpx;"> <view class="uni-flex uni-column " style="margin: 10rpx;">
@ -61,11 +56,7 @@
type="line"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<uni-easyinput <uni-easyinput class="" trim="all" ref="inputBatchCode" v-model="batchCode"
class=""
trim="all"
ref="inputBatchCode"
v-model="batchCode"
@confirm="onConfirmBatchCode"></uni-easyinput> @confirm="onConfirmBatchCode"></uni-easyinput>
</view> </view>
</view> </view>
@ -74,11 +65,7 @@
type="line"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<uni-easyinput <uni-easyinput class="" trim="all" ref="inputReferenceCode" v-model="referenceCode"
class=""
trim="all"
ref="inputReferenceCode"
v-model="referenceCode"
@confirm="onConfirmReferenceCode"></uni-easyinput> @confirm="onConfirmReferenceCode"></uni-easyinput>
</view> </view>
</view> </view>
@ -87,11 +74,7 @@
type="line"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<uni-easyinput <uni-easyinput class="" ref="inputSupplierCode" trim="all" v-model="supplierCode"
class=""
ref="inputSupplierCode"
trim="all"
v-model="supplierCode"
@confirm="onConfirmSupplierCode"></uni-easyinput> @confirm="onConfirmSupplierCode"></uni-easyinput>
</view> </view>
</view> </view>
@ -100,11 +83,7 @@
type="line"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<uni-easyinput <uni-easyinput class="" trim="all" ref="inputWeight" v-model="weight"
class=""
trim="all"
ref="inputWeight"
v-model="weight"
@confirm="onConfirmWeight"></uni-easyinput> @confirm="onConfirmWeight"></uni-easyinput>
</view> </view>
</view> </view>
@ -125,8 +104,7 @@
</view> </view>
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal> <winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal>
<wz-select-popup ref="selectPopup" title="选择计划单号" @select="select" /> <wz-select-popup ref="selectPopup" title="选择生产计划" @select="selectPlan" />
<wz-select-popup ref="selectPopupMaterial" title="选择原料" @select="selectMaterial" />
<showModal ref="comMessage" @confirm="confirm"></showModal> <showModal ref="comMessage" @confirm="confirm"></showModal>
@ -142,11 +120,11 @@
getMaterialList getMaterialList
} from "../foam/mock.js" } from "../foam/mock.js"
import { import {
getPlaneNumberList, getPlasticsPlaneNumberList,
getMaterialLists, getMaterialLists,
foamInputSubmit, plasticsInputSubmit,
getBucketCode, getBucketCode,
getItemCode checkItemCodeByBucket
} from '@/api/request2.js'; } from '@/api/request2.js';
import showModal from '../../mycomponents/common/showModal.vue' import showModal from '../../mycomponents/common/showModal.vue'
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue" import winScanNormal from "@/mycomponents/scan/winScanNormal.vue"
@ -161,7 +139,7 @@
data() { data() {
return { return {
dateTime: "", dateTime: "",
planNumber: "",
planName: "", planName: "",
dataList: [], dataList: [],
userForm: { userForm: {
@ -169,15 +147,14 @@
values: [], values: [],
origin: [] origin: []
}, },
planCode: "", bucketCheckCode: "",
bucketCheckCode:"", bucketCode: "",
bucketCode:"", itemCode: "",
itemCode:"", itemCheckCode: "",
itemCheckCode:"", batchCode: "",
batchCode:"", referenceCode: "",
referenceCode:"", supplierCode: "",
supplierCode:"", weight: "",
weight:"",
} }
@ -194,220 +171,180 @@
// //
console.log(event.detail); console.log(event.detail);
}, },
itemClear(){ itemClear() {
this.itemCode = "" this.itemCode = ""
this.itemCheckCode = ""; this.itemCheckCode = "";
}, },
bucketClear(){ bucketClear() {
this.bucketCode = "" this.bucketCode = ""
this.bucketCheckCode = ""; this.bucketCheckCode = "";
}, },
onConfirmBucketCode(data){ onConfirmBucketCode(data) {
this.itemCode = "" this.itemCode = ""
this.itemCheckCode ="" this.itemCheckCode = ""
if(data==undefined||data==""){ if (data == undefined || data == "") {
this.showMessage("2.料筒号", "输入料筒号") this.showMessage("2.料筒号", "输入料筒号")
this.$refs.inputBucketCode.focused = true this.$refs.inputBucketCode.focused = true
return; return;
} }
uni.showLoading({ this.bucketCode = data
title: "加载中",
mask: true
})
// getBucketCode().then(res=>{
// uni.hideLoading();
// this.bucketCheckCode = data;
// }).catch(error=>{
// uni.hideLoading();
// this.bucketCode = ""
// this.bucketCheckCode = "";
// this.showMessage("2.",""+data+""+error)
// })
if(this.checkBucketCode(data)){
this.bucketCheckCode = data; this.bucketCheckCode = data;
this.$refs.inputItemCode.focused = true this.$refs.inputItemCode.focused = true
}else {
this.bucketCode = ""
this.bucketCheckCode = "";
this.showMessage("2.料筒号","料筒号【"+data+"】无效")
}
}, },
onConfirmItemCode(data){ onConfirmItemCode(data) {
if(this.bucketCheckCode==""){ if (this.bucketCheckCode == "") {
this.itemCode = "" this.itemCode = ""
this.bucketCheckCode ="" this.bucketCheckCode = ""
this.$refs.inputBucketCode.focused = true this.$refs.inputBucketCode.focused = true
this.showMessage("2.料筒号","请先扫描料筒号") this.showMessage("2.料筒号", "请先扫描料筒号")
return; return;
} }
if(data==undefined||data==""){ if (data == undefined || data == "") {
this.showMessage("3.零件号","输入零件号") this.showMessage("3.零件号", "输入零件号")
this.$refs.inputItemCode.focused = true this.$refs.inputItemCode.focused = true
return; return;
} }
// getItemCode().then(res=>{ checkItemCodeByBucket(this.bucketCode, this.itemCode).then(res => {
// uni.hideLoading(); uni.hideLoading();
// this.itemCheckCode = data; this.itemCheckCode = data;
// }).catch(error=>{
// uni.hideLoading();
// this.itemCode = ""
// this.itemCheckCode = "";
// this.showMessage("3.",""+data+""+error)
// })
if(this.checkItemCode(data)){
this.itemCode = data this.itemCode = data
this.itemCheckCode =data
this.$refs.inputBatchCode.focused = true this.$refs.inputBatchCode.focused = true
}else { }).catch(error => {
uni.hideLoading();
this.itemCode = "" this.itemCode = ""
this.itemCheckCode ="" this.itemCheckCode = "";
this.showMessage("3.零件号","零件号【"+data+"】无效") this.$refs.inputItemCode.focused = true
} this.showMessage("3.零件号", "零件号【" + data + "】无效," + error)
// this.showMessage("3.",error)
})
}, },
confirm(content){ confirm(content) {
if(content.includes("料筒")){ if (content.includes("料筒")) {
this.$refs.inputBucketCode.focused = true this.$refs.inputBucketCode.focused = true
}else if(content.includes("零件")){ } else if (content.includes("零件")) {
this.$refs.inputItemCode.focused = true this.$refs.inputItemCode.focused = true
}else if(content.includes("批次")){ } else if (content.includes("批次")) {
this.$refs.inputBatchCode.focused = true this.$refs.inputBatchCode.focused = true
}else if(content.includes("参考")){ } else if (content.includes("参考")) {
this.$refs.inputReferenceCode.focused = true this.$refs.inputReferenceCode.focused = true
}else if(content.includes("供应商")){ } else if (content.includes("供应商")) {
this.$refs.inputSupplierCode.focused = true this.$refs.inputSupplierCode.focused = true
}else if(content.includes("重量")){ } else if (content.includes("重量")) {
this.$refs.inputWeight.focused = true this.$refs.inputWeight.focused = true
} }
}, },
checkBucketCode(code){ onConfirmBatchCode(data) {
var isCheckPass =false; if (data == undefined || data == "") {
if(code=="1"){ this.showMessage("4.批次", "输入批次号位空")
isCheckPass=true
}else {
isCheckPass=false
}
return isCheckPass;
},
checkItemCode(code){
var isCheckPass =false;
if(code=="123"){
isCheckPass=true
}else {
isCheckPass=false
}
return isCheckPass;
},
onConfirmBatchCode(data){
if(data==undefined||data==""){
this.showMessage("4.批次","输入批次号位空")
return; return;
} }
this.$refs.inputReferenceCode.focused = true this.$refs.inputReferenceCode.focused = true
}, },
onConfirmReferenceCode(data){ onConfirmReferenceCode(data) {
if(data==undefined||data==""){ if (data == undefined || data == "") {
this.showMessage("4.批次","输入参考号位空") this.showMessage("4.批次", "输入参考号位空")
return; return;
} }
this.$refs.inputSupplierCode.focused = true this.$refs.inputSupplierCode.focused = true
}, },
onConfirmSupplierCode(data){ onConfirmSupplierCode(data) {
if(data==undefined||data==""){ if (data == undefined || data == "") {
this.showMessage("6.供应商编码","输入供应商编码位空") this.showMessage("6.供应商编码", "输入供应商编码位空")
return; return;
} }
this.$refs.inputWeight.focused = true this.$refs.inputWeight.focused = true
}, },
onConfirmWeight(data){ onConfirmWeight(data) {
if(data==undefined||data==""){ if (data == undefined || data == "") {
this.showMessage("7.数量","输入数量为空") this.showMessage("7.数量", "输入数量为空")
return; return;
} }
}, },
submit() { submit() {
if (this.planCode == "") { if (this.planNumber == "") {
this.showMessage("1.计划单号","请选择计划单号") this.showMessage("1.生产计划", "请选择生产计划")
return return
} }
if (this.bucketCode == "") { if (this.bucketCode == "") {
this.bucketCode="" this.bucketCode = ""
this.bucketCheckCode == "" this.bucketCheckCode == ""
this.showMessage("2.料筒号","请扫描料筒号") this.showMessage("2.料筒号", "请扫描料筒号")
return return
} }
if (this.bucketCheckCode == "") { if (this.bucketCheckCode == "") {
this.showMessage("2.料筒号","请按回车校验料筒号") this.showMessage("2.料筒号", "请按回车校验料筒号")
return return
} }
if (this.itemCode == "") { if (this.itemCode == "") {
this.itemCode="" this.itemCode = ""
this.itemCheckCode == "" this.itemCheckCode == ""
this.showMessage("3.零件号","请扫描零件号") this.showMessage("3.零件号", "请扫描零件号")
return return
} }
if (this.itemCheckCode == "") { if (this.itemCheckCode == "") {
this.showMessage("3.零件号","请按回车校验零件号") this.showMessage("3.零件号", "请按回车校验零件号")
return return
} }
if (this.batchCode == "") { if (this.batchCode == "") {
this.showMessage("4.批次号","请扫描批次号") this.showMessage("4.批次号", "请扫描批次号")
return return
} }
if (this.referenceCode == "") { if (this.referenceCode == "") {
this.showMessage("5.参考号","请扫描参考号") this.showMessage("5.参考号", "请扫描参考号")
return return
} }
if (this.supplierCode == "") { if (this.supplierCode == "") {
this.showMessage("6.供应商编码","请扫描供应商") this.showMessage("6.供应商编码", "请扫描供应商")
return return
} }
if (this.weight == "") { if (this.weight == "") {
this.showMessage("7.数量","请输入重量") this.showMessage("7.数量", "请输入重量")
return return
} }
if (this.weight ==0) { if (this.weight == 0) {
this.showMessage("7.数量","输入重量必须大于0") this.showMessage("7.数量", "输入重量必须大于0")
return return
} }
var param ={ var param = {
planCode:this.planCode, planNumber: this.planNumber,
bucketCode:this.bucketCheckCode, bucketCode: this.bucketCheckCode,
itemCode:this.itemCheckCode, itemCode: this.itemCheckCode,
batchCode:this.batchCode, batchCode: this.batchCode,
referenceCode:this.referenceCode, referenceCode: this.referenceCode,
supplierCode:this.supplierCode, supplierCode: this.supplierCode,
weight:this.weight weight: this.weight,
id: this.$store.state.user.id,
createTime: getCurrDateTime(),
} }
console.log("参数",param) console.log("参数", param)
// uni.showLoading({ // uni.showLoading({
// title: "", // title: "",
// mask: true // mask: true
// }) // })
// var param = { // var param = {
// planCode: this.planCode, // planNumber: this.planNumber,
// materialName: this.materialName, // materialName: this.materialName,
// materialQty: this.materialQty // materialQty: this.materialQty
// } // }
// foamInputSubmit(param).then(res=>{ // plasticsInputSubmit(param).then(res=>{
// uni.hideLoading() // uni.hideLoading()
// this.showMessage("") // this.showMessage("")
// this.clearData() // this.clearData()
@ -416,44 +353,32 @@
// this.showMessage(error) // this.showMessage(error)
// }) // })
}, },
showMessage(title,hint) { showMessage(title, hint) {
this.$refs.inputBucketCode.focused = false
this.$refs.inputItemCode.focused = false
this.$refs.inputBatchCode.focused = false
this.$refs.inputReferenceCode.focused = false
this.$refs.inputSupplierCode.focused = false
this.$refs.inputWeight.focused = false
this.$refs.comMessage.showMessage(title, hint) this.$refs.comMessage.showMessage(title, hint)
}, },
resetData() { resetData() {
this.planCode = ""; this.planNumber = "";
this.materialName = "" this.materialName = ""
this.materialQty = 0 this.materialQty = 0
}, },
showPlanSelect() { showPlanSelect() {
// uni.showLoading({ uni.showLoading({
// title:"", title: "加载中",
// mask:true mask: true
// }) })
// getPlaneNumberList().then(res=>{ getPlasticsPlaneNumberList().then(res => {
// uni.hideLoading() uni.hideLoading()
// this.$refs.selectPopup.open({ var list = [];
// mode: 'radio', //radio checkbox list = res.Result;
// dataList: getDataList(), //dataList使proxyConfig
// // selected: this.userForm.values, //
// // proxyConfig: { //
// // reqFun: this.reqGetList, //
// // localPaging: false //
// // },
// search: {
// type: 'local', //local | remote
// },
// fields: {
// label: 'name',
// value: 'code'
// }
// })
// }).catch(error=>{
// uni.hideLoading()
// this.showMessage(error)
// })
this.$refs.selectPopup.open({ this.$refs.selectPopup.open({
mode: 'radio', //radio checkbox mode: 'radio', //radio checkbox
dataList: getDataList(), //dataList使proxyConfig dataList: list, //dataList使proxyConfig
// selected: this.userForm.values, // // selected: this.userForm.values, //
// proxyConfig: { // // proxyConfig: { //
// reqFun: this.reqGetList, // // reqFun: this.reqGetList, //
@ -463,10 +388,15 @@
type: 'local', //local | remote type: 'local', //local | remote
}, },
fields: { fields: {
label: 'name', label: 'PLAN_NO',
value: 'code' value: 'SHIFT_CODE'
} }
}) })
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
}, },
onConfirm(data) { onConfirm(data) {
@ -474,18 +404,13 @@
}, },
select(mode, data) { selectPlan(mode, data) {
this.planCode = data.code this.planNumber = data.PLAN_NO
this.planName = data.name this.planName = data.SHIFT_CODE
console.log(mode) console.log(mode)
console.log(data) console.log(data)
}, },
selectMaterial(mode, data) {
this.materialName = data.name
console.log("selectPopupMaterial")
},
reqGetList(data) { reqGetList(data) {
// var data ={ // var data ={
// pageIndex:1, // pageIndex:1,

10
src/pages/setter/index.vue

@ -10,8 +10,8 @@
<u-cell-item v-if="userInfo!=null" icon="file-text" title="部门" :arrow="false">{{userInfo.dept.name}}</u-cell-item> <u-cell-item v-if="userInfo!=null" icon="file-text" title="部门" :arrow="false">{{userInfo.dept.name}}</u-cell-item>
<u-cell-item v-if="userInfo!=null" icon="photo" title="岗位" :arrow="false">{{(userInfo.posts || []).map(post => post.name).join(',')}}</u-cell-item> <u-cell-item v-if="userInfo!=null" icon="photo" title="岗位" :arrow="false">{{(userInfo.posts || []).map(post => post.name).join(',')}}</u-cell-item>
<u-cell-item icon="level" v-if="userInfo!=null" title="角色" :arrow="false">{{(userInfo.roles || []).map(role => role.name).join(',')}}</u-cell-item> <u-cell-item icon="level" v-if="userInfo!=null" title="角色" :arrow="false">{{(userInfo.roles || []).map(role => role.name).join(',')}}</u-cell-item>
<u-cell-item icon="trash" title="清除缓存" @click="clear()" ></u-cell-item> <!-- <u-cell-item icon="trash" title="清除缓存" @click="clear()" ></u-cell-item> -->
<u-cell-item icon="edit-pen" title="修改密码" @click="modifiedPassWord()" ></u-cell-item> <u-cell-item icon="file-text" title="访问地址" :arrow="false">{{requestUrl}}</u-cell-item>
<u-cell-item icon="order" title="版本号" :arrow="false" @click="test111" >{{version}}</u-cell-item> <u-cell-item icon="order" title="版本号" :arrow="false" @click="test111" >{{version}}</u-cell-item>
<!-- #ifdef APP --> <!-- #ifdef APP -->
<u-cell-item icon="reload" title="检查更新" @click="update">{{version}}</u-cell-item> <u-cell-item icon="reload" title="检查更新" @click="update">{{version}}</u-cell-item>
@ -21,7 +21,7 @@
</view> </view>
<view> <view>
<button type="primary" style="margin:40rpx;" @click="handlerlogout">退出登录</button> <button type="primary" style="margin:70rpx;" @click="handlerlogout">退出登录</button>
</view> </view>
</view> </view>
@ -40,6 +40,8 @@
removeToken removeToken
} from '@/common/utils/auth' } from '@/common/utils/auth'
import config from '@/static/config.js'
// #ifdef APP-PLUS // #ifdef APP-PLUS
import { import {
appUpdate appUpdate
@ -60,7 +62,9 @@
const userName = ref(store.state.user.name); const userName = ref(store.state.user.name);
let version = ref(); let version = ref();
let userInfo = ref(null); let userInfo = ref(null);
let requestUrl =ref(null)
onLoad(() => { onLoad(() => {
requestUrl =config.request_url
getAppVersion() getAppVersion()
getUserProfile().then(res => { getUserProfile().then(res => {
userInfo.value = res.data userInfo.value = res.data

8
src/uni_modules/wz-select-popup/components/wz-select-popup/wz-list.vue

@ -1,13 +1,15 @@
<template> <template>
<view class="wz-list"> <view class="wz-list" style="display: flex; flex-direction: column;">
<view :class="item.check?'check-item':'list-item'" v-for="(item,index) in list" :key="index" <view class="" v-for="(item,index) in list" :key="index">
<view :class="item.check?'check-item':'list-item'"
@click="$emit('checkList',item)"> @click="$emit('checkList',item)">
<!-- <uni-icons v-if="item.check" type="checkbox-filled" color="#007aff" size="24"></uni-icons> <!-- <uni-icons v-if="item.check" type="checkbox-filled" color="#007aff" size="24"></uni-icons>
<uni-icons v-else type="circle" color="#999" size="24"></uni-icons> --> <uni-icons v-else type="circle" color="#999" size="24"></uni-icons> -->
<text style="color: #000 ;font-size: 35rpx; font-weight: bold;">{{index+1}}.</text> <text style="color: #000 ;font-size: 35rpx; font-weight: bold;">{{index+1}}.</text>
<view class="list-item-text" style="color: #000;font-size: 35rpx;">{{item[fields.label]}}</view> <view class="list-item-text" style="color: #000;font-size: 35rpx;">{{item[fields.label]}}</view>
</view> </view>
<view style="background-color: #000; width: 100%;height: 2rpx;"></view>
</view>
<view class="loadmore" @click="$emit('loadmore')"> <view class="loadmore" @click="$emit('loadmore')">
<view v-if="page.loading == 'loading'" class="icon"> <view v-if="page.loading == 'loading'" class="icon">
<uni-icons type="spinner-cycle" size="24"></uni-icons> <uni-icons type="spinner-cycle" size="24"></uni-icons>

5
src/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue

@ -102,11 +102,9 @@
viewScroll(e) { viewScroll(e) {
debounce(() => { debounce(() => {
this.scroll.oldTop = e.detail.scrollTop this.scroll.oldTop = e.detail.scrollTop
console.log("viewScroll")
}, 100) }, 100)
}, },
searchData(type) { searchData(type) {
console.log("查找",this.searchValue)
const { const {
search, search,
fields, fields,
@ -122,11 +120,9 @@
this.listInit(allDataList) this.listInit(allDataList)
return return
} }
console.log("查找",this.searchValue)
this.dataList = allDataList?.filter(v => v[fields.label].includes(this.searchValue)) this.dataList = allDataList?.filter(v => v[fields.label].includes(this.searchValue))
var le = this.dataList.length; var le = this.dataList.length;
this.$forceUpdate() this.$forceUpdate()
console.log("数据",le)
} else { } else {
this.proxyRequest() this.proxyRequest()
} }
@ -228,7 +224,6 @@
}, },
/**上拉触底*/ /**上拉触底*/
scrolltolower() { scrolltolower() {
console.log("scrolltolower")
if (!this.pageStatus.isEmpty && this.pageStatus.loading != 'loading') { if (!this.pageStatus.isEmpty && this.pageStatus.loading != 'loading') {
this.popConfig.page.pageIndex++ this.popConfig.page.pageIndex++
if (this.popConfig.proxyConfig.localPaging) { if (this.popConfig.proxyConfig.localPaging) {

Loading…
Cancel
Save