Browse Source

修改参数和弹出框

master
lijuncheng 6 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. 115
      src/pages/foam/input.vue
  7. 86
      src/pages/plastics/check.vue
  8. 343
      src/pages/plastics/input.vue
  9. 10
      src/pages/setter/index.vue
  10. 18
      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({
url: baseApi + "/MachineClass/Get?MachineCode="+machineCode,
method: "get",
@ -208,23 +208,45 @@ export function getDeviceInfo(machineCode) {
}
/**
* @param params获取计划单号
* @param params 注塑获取信息
*/
export function getPlaneNumberList(params) {
export function getPlasticsDeviceInfo(machineCode) {
return request({
url: baseApi + "/system/captcha/captchaImage",
url: baseApi + "/MachineClass/GZhuSuItem?Machine="+machineCode,
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获取原料信息
*/
export function getMaterialLists(params) {
export function getMaterialLists() {
return request({
url: baseApi + "/system/captcha/captchaImage",
url: baseApi + "/Ware/GetTypeList",
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 获取料筒号
*/
@ -272,13 +316,13 @@ export function getItemCode(code) {
}
/**
* @param params 泡沫投入提交
* @param params 查询料筒号与物料号是否匹配
*/
export function foamInputSubmit(params) {
export function checkItemCodeByBucket(BucketCode,itemCode) {
return request({
url: baseApi + "/system/captcha/captchaImage",
method: "post",
data: params,
url: baseApi + "/WareHouse/IsPass?BucketCode="+BucketCode+"&RawMaterial="+itemCode,
method: "get",
data: {},
});
}

2
src/common/directory.js

@ -568,5 +568,3 @@ export function getPackUnitName(value) {
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 {
deepCopyData
} from "@/common/basic.js"
import {
showConfirmMsg
} from "@/common/utils.js"
export default {
components: {
@ -286,18 +289,19 @@
submit(callBack) {
try {
var hintResult=""
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 == "") {
var hint = hintIndex + ".点检内容 : " + item.Content;
var hint ="【"+hintIndex + ".点检内容 : " + item.Content;
throw new Error(hint)
}
} else if (item.Type == 2) {
//
if (item.SelectName == "") {
var hint = hintIndex + ".点检内容 : " + item.Content;
var hint = "【"+hintIndex + ".点检内容 : "+ item.Content;
throw new Error(hint)
}
//
@ -305,38 +309,41 @@
if (!this.isWithinInterval(item.SelectName, item.putMachine[0].Limit, item
.putMachine[0]
.Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
var hint = "【"+hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
"】不在【" + 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) {
if (item.SelectName == "") {
if (item.putMachine[0].SelectName == "") {
var hint = hintIndex + ".点检内容 : " + item.Content;
var hint = "【"+hintIndex + ".点检内容 : "+ item.Content;
throw new Error(hint)
} else {
if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit,
item
.putMachine[0]
.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 + "】之间"
throw new Error(hint)
// throw new Error(hint)
hintResult=hintResult+"\n"+hint;
}
}
if (item.putMachine[1].SelectName == "") {
var hint = hintIndex + ".点检内容 : " + item.Content;
var hint = "【"+hintIndex + ".点检内容 : "+ item.Content;
throw new Error(hint)
} else {
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit,
item
.putMachine[1]
.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 + "】之间"
throw new Error(hint)
// throw new Error(hint)
hintResult=hintResult+"\n"+hint;
}
}
@ -347,29 +354,60 @@
item
.putMachine[0]
.Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
var hint = "【"+hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
"】不在【" + 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,
item
.putMachine[1]
.Floor)) {
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
var hint = "【"+hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName +
"】不在【" + 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){
if (item.SelectName == "") {
var hint = hintIndex + ".点检内容 : " + item.Content;
var hint = "【"+hintIndex + ".点检内容 : " + item.Content;
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 => {
if(res.SelectName){
if (res.SelectName.includes("班")) {
@ -420,7 +458,10 @@
// title: title,
// Content: hint
// })
this.$refs.comMessage.showMessage("提示", hint)
// this.$refs.comMessage.showMessage("", hint)
showConfirmMsg("提示",hint,callback=>{
})
},
isNumber(val) {

23
src/pages/foam/check.vue

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

115
src/pages/foam/input.vue

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

86
src/pages/plastics/check.vue

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

343
src/pages/plastics/input.vue

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

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

@ -1,12 +1,14 @@
<template>
<view class="wz-list">
<view :class="item.check?'check-item':'list-item'" v-for="(item,index) in list" :key="index"
@click="$emit('checkList',item)">
<!-- <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> -->
<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="wz-list" style="display: flex; flex-direction: column;">
<view class="" v-for="(item,index) in list" :key="index">
<view :class="item.check?'check-item':'list-item'"
@click="$emit('checkList',item)">
<!-- <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> -->
<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>
<view style="background-color: #000; width: 100%;height: 2rpx;"></view>
</view>
<view class="loadmore" @click="$emit('loadmore')">
<view v-if="page.loading == 'loading'" class="icon">

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

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

Loading…
Cancel
Save