Browse Source

修改点检校验

master
lijuncheng 8 months ago
parent
commit
31fc4ad6c9
  1. 2
      password.txt
  2. 4
      src/manifest.json
  3. 464
      src/mycomponents/form/customerFrom.vue
  4. 2
      src/pages.json
  5. 31
      src/pages/foam/check.vue
  6. 44
      src/pages/foam/input.vue
  7. 25
      src/pages/index/index.vue
  8. 36
      src/pages/setter/index.vue
  9. 4
      src/store/modules/user.js
  10. 8
      src/uni_modules/wz-select-popup/components/wz-select-popup/wz-list.vue
  11. BIN
      test.keystore

2
password.txt

@ -1,2 +1,2 @@
别名:testalias 别名:testalias
密码: wms3.0 密码: putandin

4
src/manifest.json

@ -1,6 +1,6 @@
{ {
"name" : "wms", "name" : "投入产出",
"appid" : "__UNI__43932FE", "appid" : "__UNI__37328FF",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : 1, "versionCode" : 1,

464
src/mycomponents/form/customerFrom.vue

@ -36,147 +36,150 @@
</view> </view>
</u-radio-group> </u-radio-group>
</view>
<!-- <input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder"
v-model="item.SelectName" /> -->
</view> </view>
<view class="" <!-- <input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder"
style="width: 100%;background-color: gray;height: 2rpx; margin-top: 15rpx;margin-bottom: 15rpx;" /> v-model="item.SelectName" /> -->
</view> </view>
<view class=""
style="width: 100%;background-color: gray;height: 2rpx; margin-top: 15rpx;margin-bottom: 15rpx;" />
</view>
<view class="" v-else-if="item.Type=='2'"> <view class="" v-else-if="item.Type=='2'">
<view class="flex uni-row " style=" padding-left: 10rpx; border-bottom: #9e9e9e;"> <view class="flex uni-row " style=" padding-left: 10rpx; border-bottom: #9e9e9e;">
<view class=" " style="margin-top: 3rpx;"> <view class=" " style="margin-top: 3rpx;">
<text class="colorRed">*</text> <text class="colorRed">*</text>
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> <text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text>
</view>
<view class="uni-flex uni-column">
<view class="position">
点检部位 : {{ item.Position }}
</view> </view>
<view class="uni-flex uni-column"> <view class="content">
<view class="position"> 点检内容 : {{ item.Content }}
点检部位 : {{ item.Position }} </view>
</view> <view class="methond" style="margin-bottom: 10rpx;">
<view class="content"> 点检方法 : {{item.Methond}}
点检内容 : {{ item.Content }}
</view>
<view class="methond" style="margin-bottom: 10rpx;">
点检方法 : {{item.Methond}}
</view>
</view> </view>
</view> </view>
</view>
<view class=""> <view class="">
<view class="" style="margin-left: 50rpx;"> <view class="" style="margin-left: 50rpx;">
<view class=""> <view class="">
<text style="font-size: 32rpx; font-weight:550">点检状态</text> <text style="font-size: 32rpx; font-weight:550">点检状态</text>
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text> <text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text>
</view>
<u-radio-group v-if="isRefresh" v-model="item.SelectName" @change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataInputList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}}
</u-radio>
</view>
</view>
</u-radio-group>
</view> </view>
<input class="input" v-if="item.putMachine.length==1" style="margin-left: 50rpx;" <u-radio-group v-if="isRefresh&&isRefreshType2" v-model="item.SelectName" @change="radioGroupChange(item)">
:placeholder="item.putMachine[0].Name" v-model="item.SelectName" /> <view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataInputList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}}
</u-radio>
</view>
</view>
</u-radio-group>
</view> </view>
<input class="input" v-if="item.putMachine.length==1" style="margin-left: 50rpx;"
type="digit" placeholder="" v-model="item.SelectName" @input="inputType2" />
</view> </view>
</view>
<view class="" v-else-if="item.Type=='3'">
<view class="flex uni-row " style="padding-left: 10rpx; border-bottom: #9e9e9e;"> <view class="" v-else-if="item.Type=='3'">
<view class="" style="margin-top: 3rpx;"> <view class="flex uni-row " style="padding-left: 10rpx; border-bottom: #9e9e9e;">
<text class="colorRed">*</text> <view class="" style="margin-top: 3rpx;">
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> <text class="colorRed">*</text>
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text>
</view>
<view class="uni-flex uni-column">
<view class="position">
点检部位 : {{ item.Position }}
</view> </view>
<view class="uni-flex uni-column"> <view class="content">
<view class="position"> 点检内容 : {{ item.Content }}
点检部位 : {{ item.Position }}
</view>
<view class="content">
点检内容 : {{ item.Content }}
</view>
<view class="methond" style="margin-bottom: 10rpx;">
点检方法 : {{item.Methond}}
</view>
</view> </view>
<view class="methond" style="margin-bottom: 10rpx;">
点检方法 : {{item.Methond}}
</view>
</view>
</view>
<view class="">
<view class="" style="margin-left: 50rpx;" v-if="item.Methond!='压力表示数范围2.5bar~4.5bar'">
<view class="">
<text style="font-size: 32rpx; font-weight:550">点检状态</text>
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text>
</view>
<u-radio-group v-if="isRefresh&&isRefreshType3" v-model="item.SelectName"
@change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataInputList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}}
</u-radio>
</view>
</view>
</u-radio-group>
</view> </view>
<view class=""> <view class="" v-if="item.putMachine.length>1">
<!-- <input class="input" style="margin-left: 50rpx;" :placeholder="item.placeholder"
v-model="item.SelectName" /> -->
<view class="" style="margin-left: 50rpx;"> <view class="" style="margin-left: 50rpx;">
<view class=""> <text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[0].Name}}({{item.putMachine[0].Limit}}~{{item.putMachine[0].Floor}})</text>
<text style="font-size: 32rpx; font-weight:550">点检状态</text> <input class="input" @input="inputMain(item)" type="number"
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text> placeholder="" v-model="item.putMachine[0].SelectName" />
</view>
<u-radio-group v-if="isRefresh&&isRefreshType3" v-model="item.SelectName"
@change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataInputList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}}
</u-radio>
</view>
</view>
</u-radio-group>
</view> </view>
<view class="" v-if="item.putMachine.length>1"> <view class="" style="margin-left: 50rpx;">
<!-- <input class="input" style="margin-left: 50rpx;" :placeholder="item.placeholder" <text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[1].Name}}({{item.putMachine[1].Limit}}~{{item.putMachine[1].Floor}})</text>
v-model="item.SelectName" /> --> <input class="input" @input="inputMinor(item)" type="number"
<view class="" style="margin-left: 50rpx;"> placeholder="" v-model="item.putMachine[1].SelectName" />
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[0].Name}}</text>
<input class="input" @input="inputMain(item)" type="number"
:placeholder="item.putMachine[0].Name" v-model="item.putMachine[0].SelectName" />
</view>
<view class="" style="margin-left: 50rpx;">
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[1].Name}}</text>
<input class="input" @input="inputMinor(item)" type="number"
:placeholder="item.putMachine[1].Name" v-model="item.putMachine[1].SelectName" />
</view>
</view> </view>
</view> </view>
<view class=""
style="width: 100%;background-color: gray;height: 2rpx; margin-top: 15rpx;margin-bottom: 15rpx;" />
</view> </view>
<view class="" v-else-if="item.Type=='5'"> </view>
<view class="flex uni-row" style="padding-left: 10rpx; border-bottom: #9e9e9e;"> <view class="" v-else-if="item.Type=='4'">
<view class="" style="margin-top: 3rpx;">
<text class="colorRed">*</text> <view class="flex uni-row" style="padding-left: 10rpx; border-bottom: #9e9e9e;">
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> <view class="" style="margin-top: 3rpx;">
</view> <text class="colorRed">*</text>
<view class="" style="display: flex;flex-direction: column;"> <text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text>
<view class="position"> </view>
{{ item.Content }} <view class="" style="display: flex;flex-direction: column;">
</view> <view class="position">
{{ item.Content }}
</view> </view>
</view> </view>
</view>
<view class=""> <view class="">
<view class="" style="margin-left: 50rpx;"> <view class="" style="margin-left: 50rpx;">
<view style="font-size: 30rpx; color: #9e9e9e;">(单选)</view> <view style="font-size: 30rpx; color: #9e9e9e;">(单选)</view>
<u-radio-group v-if="isRefresh" v-model="item.SelectName" @change="radioGroupChange(item)"> <u-radio-group v-if="isRefresh" v-model="item.SelectName" @change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" <view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataClassList" :key="index"> v-for="(radio, index) in dataClassList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> <view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name" @change="radioChange(radio)"> <u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}} {{radio.name}}
</u-radio> </u-radio>
</view>
</view> </view>
</u-radio-group> </view>
</view> </u-radio-group>
<!-- <input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder"
v-model="item.SelectName" /> -->
</view> </view>
<!-- <input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder"
v-model="item.SelectName" /> -->
</view> </view>
</view> </view>
<showModal ref="comMessage"></showModal> </view>
<showModal ref="comMessage"></showModal>
</view> </view>
</template> </template>
@ -240,6 +243,7 @@
current: 0, current: 0,
isRefresh: true, isRefresh: true,
isRefreshType3: true, isRefreshType3: true,
isRefreshType2: true,
}; };
@ -273,6 +277,13 @@
} }
this.reload3() this.reload3()
}, },
inputType2(item){
// if(item.length==0){
// }
this.reload2()
},
submit(callBack) { submit(callBack) {
@ -303,176 +314,64 @@
} }
} 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, item if (!this.isWithinInterval(item.putMachine[0].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.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)
} }
} }
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, item if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit,
item
.putMachine[1] .putMachine[1]
.Floor)) { .Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.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)
} }
} }
}else {if (!this.isExitList(item.SelectName)) {
if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit, item
.putMachine[0]
.Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
"】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间"
throw new Error(hint)
}
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit, item
.putMachine[1]
.Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
"】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间"
throw new Error(hint)
}
}}
}
}
this.formData.forEach(res => {
if (res.SelectName.includes("班")) {
var value = this.dataClassList.filter(item => item.name == res.SelectName)
if (value.length > 0) {
res.SelectValue = value[0].value
} else { } else {
res.SelectValue = "" if (!this.isExitList(item.SelectName)) {
} if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit,
} else { item
var value = this.dataList.filter(item => item.name == res.SelectName) .putMachine[0]
if (value.length > 0) { .Floor)) {
res.SelectValue = value[0].value var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
} else { "】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间"
res.SelectValue = res.SelectName throw new Error(hint)
}
}
})
callBack(this.formData)
} catch (error) {
this.showHint("", error.message)
}
},
submitss(callBack) {
var isCheckPass = true
for (var i = 0; i < this.formData.length; i++) {
var item = this.formData[i];
var hintIndex = i + 1
if (item.Type == 1) {
if (item.SelectName == "") {
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder)
isCheckPass = false;
break
}
} else if (item.Type == 2) {
} else
if (item.Type == 3) {
if (item.SelectName == "") {
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.inputLow.placeholder)
isCheckPass = false;
break
} else {
if (!this.isWithinInterval(item.inputLow.name, item.inputLow.lower, item.inputLow
.upper)) {
this.showHint(hintIndex + ".点检内容 : " + item.Content, "最低压 : 输入数量【" + item.inputLow
.name +
"】不在【" + item.inputLow.lower + "】和【" + item.inputLow.upper + "】之间")
isCheckPass = false;
break
}
}
if (item.inputHigh.name == "") {
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.inputHigh.placeholder)
isCheckPass = false;
break
} else {
if (!this.isWithinInterval(item.inputHigh.name, item.inputHigh.lower, item.inputHigh
.upper)) {
this.showHint(hintIndex + ".点检内容 : " + item.Content, "最高压 : 输入数量【" + item.inputHigh
.name +
"】不在【" + item.inputHigh.lower + "】和【" + item.inputHigh.upper + "】之间")
isCheckPass = false;
break
}
}
} else if (item.Type == 2) {
if (item.SelectName == "") {
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder)
isCheckPass = false;
break
} else {
if (!this.isExitList(item.SelectName)) {
if (item.putMachine.length > 0) {
for (var i = 0; i < item.putMachine.length; i++) {
var temp = item.putMachine[i]
if (item.SelectName == "") {
this.showHint(hintIndex + ".点检内容 : " + item.Content, temp.Name)
isCheckPass = false;
break
}
if (!this.isWithinInterval(item.SelectName, temp.Limit, temp.Floor)) {
this.showHint(hintIndex + ".点检内容 : " + item.Content, "输入数量【" + item
.SelectName +
"】不在【" + temp.Limit + "】和【" + temp.Floor + "】之间")
isCheckPass = false;
break
}
} }
} else { if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit,
if (!this.isWithinInterval(item.SelectName, item.Limit, item.Floor)) { item
this.showHint(hintIndex + ".点检内容 : " + item.Content, "输入数量【" + item .putMachine[1]
.SelectName + .Floor)) {
"】不在【" + item.Limit + "】和【" + item.Floor + "】之间") var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
isCheckPass = false; "】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间"
break throw new Error(hint)
} }
} }
} }
}else if(item.Type == 4){
} if (item.SelectName == "") {
} else if (item.type == "groupSelect") { var hint = hintIndex + ".点检内容 : " + item.Content;
if (item.SelectName == "") { throw new Error(hint)
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder) }
isCheckPass = false;
break
} }
} }
}
if (isCheckPass) {
this.formData.forEach(res => { this.formData.forEach(res => {
if (res.SelectName.includes("班")) { if (res.SelectName.includes("班")) {
var value = this.dataClassList.filter(item => item.name == res.SelectName) var value = this.dataClassList.filter(item => item.name == res.SelectName)
@ -486,22 +385,25 @@
if (value.length > 0) { if (value.length > 0) {
res.SelectValue = value[0].value res.SelectValue = value[0].value
} else { } else {
res.SelectValue = "" res.SelectValue = res.SelectName
} }
} }
}) })
callBack(this.formData)
// this.$emit("submit",this.formData) callBack(this.formData)
console.log("通过", this.formData) } catch (error) {
} else { this.showHint("", error.message)
console.log("失败")
} }
}, },
isWithinInterval(num, lower, upper) { isWithinInterval(num, lower, upper) {
var num =Number(num); var num = Number(num);
var lower =Number(lower); var lower = Number(lower);
var upper =Number(upper); var upper = Number(upper);
if (!this.isNumber(num)) { if (!this.isNumber(num)) {
return true; return true;
} }
@ -528,23 +430,20 @@
reset() { reset() {
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];
if (item.type == "inputRange") { if(item.Type == "1"){
item.inputLow.name = ""; item.SelectName = ""
item.inputHigh.name = "" item.SelectValue= ""
} else if (item.type == "inputAndSelect") { }else if(item.Type == "2"){
if (item.putMachine) {
item.putMachine.name = ""
item.putMachine.value = ""
}
if (item.minor) {
item.minor.name = ""
item.minor.value = ""
}
item.SelectName = "" item.SelectName = ""
item.value = "" item.SelectValue= ""
} else { }else if(item.Type == "3"){
item.putMachine.forEach(res=>{
res.SelectName=""
res.SelectValue=""
})
}else if(item.Type == "4"){
item.SelectName = "" item.SelectName = ""
item.value = "" item.SelectValue= ""
} }
} }
// var testList =deepCopyData(this.dataList) // var testList =deepCopyData(this.dataList)
@ -563,12 +462,19 @@
this.isRefresh = true this.isRefresh = true
this.isRefreshType3 = true this.isRefreshType3 = true
}) })
this.$forceUpdate()
}, },
reload3() { reload3() {
this.isRefreshType3 = false this.isRefreshType3 = false
this.$nextTick(() => { this.$nextTick(() => {
this.isRefreshType3 = true this.isRefreshType3 = true
}) })
},
reload2() {
this.isRefreshType2 = false
this.$nextTick(() => {
this.isRefreshType2 = true
})
} }

2
src/pages.json

@ -3,7 +3,7 @@
"pages": [{ "pages": [{
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "WMS仓库管理系统-移动端", "navigationBarTitleText": "投入产出管理系统-移动端",
"titleNView": { "titleNView": {
// "autoBackButton": "true", // "autoBackButton": "true",
"buttons": [{}] "buttons": [{}]

31
src/pages/foam/check.vue

@ -4,10 +4,10 @@
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=""> <view class="">
<view class="" style="margin: 5rpx;"> <view class="" style="margin: 5rpx; font-weight: bold;">
设备编号 : {{deviceCode}} 设备编号 : {{deviceCode}}
</view> </view>
<view class="" style="margin: 5rpx;" v-if="deviceName!=''"> <view class="" style="margin: 5rpx; font-weight: bold;" v-if="deviceName!=''">
设备名称 : {{deviceName}} 设备名称 : {{deviceName}}
</view> </view>
@ -77,7 +77,7 @@
dateTime: "", dateTime: "",
deviceCode: "", deviceCode: "",
deviceName: "", deviceName: "",
worker: "admin", worker: this.$store.state.user.id,
dataList: [], dataList: [],
formData: [{ formData: [{
type: "stateSelect", type: "stateSelect",
@ -219,20 +219,24 @@
this.reset(); this.reset();
this.closeScanPopup(); this.closeScanPopup();
var groupSelect = { var groupSelect = {
Type: "5", Type: "4",
Content: "选择班组", Content: "选择班组",
placeholder: "请选择班组", SelectName: "",
name: '', SelectValue: "",
value: "",
} }
// 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=>{ this.dataList.forEach(res=>{
res.SelectName="" res.SelectName=""
res.putMachine.forEach(item=>{ res.SelectValue=""
item.SelectName="" 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()
@ -256,9 +260,9 @@
return return
} }
this.$refs.customerFrom.submit(data => { this.$refs.customerFrom.submit(data => {
data.worker ="admin";
var commitData={ var commitData={
worker:"admin", LoginUserID:this.$store.state.user.id,
UserName:this.$store.state.user.name,
createTime:getCurrDateTime(), createTime:getCurrDateTime(),
dataList:data dataList:data
} }
@ -293,6 +297,9 @@
closeScanPopup() { closeScanPopup() {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}, },
showMessage(hint){
this.$refs.comMessage.showMessage("提示", hint)
},
} }
} }

44
src/pages/foam/input.vue

@ -26,11 +26,11 @@
</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: 80%; ">
<input class="input" disabled v-model="planNumber" /> <input class="input" disabled v-model="planNumber" />
</view> </view>
<view class="uni-flex" style="width: 25%; align-items: center;"> <view class="uni-flex" style="width: 20%; align-items: center;">
<button type="primary" size="mini" @click="showPlanSelect">选择单号</button> <button type="primary" size="mini" @click="showPlanSelect">单号</button>
</view> </view>
</view> </view>
@ -40,11 +40,11 @@
<uni-section title="原料名称" subTitle="输入或者选择原料名称" subTitleFontSize="26rpx" titleFontSize="35rpx" type="line"> <uni-section title="原料名称" subTitle="输入或者选择原料名称" subTitleFontSize="26rpx" titleFontSize="35rpx" type="line">
</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: 80%;">
<input class="input" v-model="materialName" /> <input class="input" v-model="materialName" />
</view> </view>
<view class="uni-flex" style="width: 25%; align-items: center;"> <view class="uni-flex" style="width: 20%; align-items: center;">
<button type="primary" size="mini" @click="showMaterialSelect">选择原料</button> <button type="primary" size="mini" @click="showMaterialSelect">原料</button>
</view> </view>
</view> </view>
</view> </view>
@ -206,22 +206,22 @@
uni.hideLoading() uni.hideLoading()
this.showMessage(error) this.showMessage(error)
}) })
this.$refs.selectPopup.open({ // this.$refs.selectPopup.open({
mode: 'radio', //radio checkbox // mode: 'radio', //radio checkbox
dataList: getDataList(), //dataList使proxyConfig // dataList: getDataList(), //dataList使proxyConfig
// selected: this.userForm.values, // // // selected: this.userForm.values, //
// proxyConfig: { // // // proxyConfig: { //
// reqFun: this.reqGetList, // // // reqFun: this.reqGetList, //
// localPaging: false // // // localPaging: false //
// }, // // },
search: { // search: {
type: 'local', //local | remote // type: 'local', //local | remote
}, // },
fields: { // fields: {
label: 'name', // label: 'name',
value: 'code' // value: 'code'
} // }
}) // })
}, },

25
src/pages/index/index.vue

@ -91,7 +91,8 @@
position: [-10, -10], position: [-10, -10],
menusCount: {}, menusCount: {},
filterList: [], filterList: [],
serchval: "" serchval: "",
backButtonPress: 0
} }
}, },
onLoad() { onLoad() {
@ -108,8 +109,7 @@
}, },
onHide() { onHide() {},
},
onShow() { onShow() {
if (uni.getStorageSync("hasLogin") == null || uni.getStorageSync("hasLogin") == false) { if (uni.getStorageSync("hasLogin") == null || uni.getStorageSync("hasLogin") == false) {
uni.showModal({ uni.showModal({
@ -131,11 +131,22 @@
} }
} }
}) })
} }
}, },
onUnload() { onUnload() {},
onBackPress(e) {
// returntrue
this.backButtonPress++;
if (this.backButtonPress > 1) {
plus.runtime.quit();
} else {
plus.nativeUI.toast('再滑一次退出应用11');
}
setTimeout(function() {
this.backButtonPress = 0;
}, 1000);
return true;
}, },
mounted() {}, mounted() {},
methods: { methods: {
findList(tab) { findList(tab) {
@ -258,7 +269,7 @@
openCheck(url) { openCheck(url) {
uni.navigateTo({ uni.navigateTo({
url: url url: url
}); });
this.filterList = [] this.filterList = []
}, },

36
src/pages/setter/index.vue

@ -57,7 +57,7 @@
const app = createApp({}); const app = createApp({});
// app.component({ // app.component({
// }); // });
const userName = ref(store.state.user.name); const userName = ref(store.state.user.id);
let test = ref("123"); let test = ref("123");
let version = ref(); let version = ref();
let userInfo = ref(null); let userInfo = ref(null);
@ -79,30 +79,18 @@
function handlerlogout() { function handlerlogout() {
store.dispatch('LogOut', {}).then(() => { clearStorage();
clearStorage(); // #ifdef H5
// #ifdef H5 uni.reLaunch({
uni.reLaunch({ url: '../login/index'
url: '../login/index'
})
// #endif
// #ifdef APP
plus.runtime.quit()
// #endif
}).catch(error=>{
clearStorage();
// #ifdef H5
uni.reLaunch({
url: '../login/index'
})
// #endif
// #ifdef APP
plus.runtime.quit()
// #endif
}) })
// #endif
// #ifdef APP
plus.runtime.quit()
// #endif
}; };
function clearStorage() { function clearStorage() {

4
src/store/modules/user.js

@ -52,8 +52,8 @@ const user = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(username, password).then(res => { login(username, password).then(res => {
if(res){ if(res){
commit('SET_ID',res.Result.LoginUserID)
// 设置 token commit('SET_NAME',res.Result.UserName)
resolve(res) resolve(res)
}else { }else {
uni.showToast({ uni.showToast({

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

@ -4,8 +4,9 @@
@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> -->
{{index+1}}. <text style="color: #000 ;font-size: 35rpx; font-weight: bold;">{{index+1}}.</text>
<view class="list-item-text">{{item[fields.label]}}</view>
<view class="list-item-text" style="color: #000;font-size: 35rpx;">{{item[fields.label]}}</view>
</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">
@ -76,10 +77,9 @@
.list-item { .list-item {
display: flex; display: flex;
align-items: center; align-items: center;
color: $uni-text-color-grey; color: gray;
padding: $uni-spacing-col-base; padding: $uni-spacing-col-base;
margin-bottom: $uni-spacing-col-sm; margin-bottom: $uni-spacing-col-sm;
background-color: #fff;
.list-item-text { .list-item-text {
@include wz-line(2); @include wz-line(2);

BIN
test.keystore

Binary file not shown.
Loading…
Cancel
Save