Browse Source

修改弹出框

master
lijuncheng 7 months ago
parent
commit
86f0b5dbc7
  1. 19
      src/api/request2.js
  2. 4
      src/common/classify.data.js
  3. 4
      src/pages.json
  4. 19
      src/pages/foam/check.vue
  5. 33
      src/pages/foam/input.vue
  6. 22
      src/pages/plastics/check.vue
  7. 94
      src/pages/plastics/input.vue

19
src/api/request2.js

@ -272,22 +272,33 @@ export function foamCheckSubmit(params) {
}
/**
* @param params 原料投入泡沫提交
* @param params 注塑点检提交
*/
export function plasticsCheckSubmit(params) {
return request({
url: baseApi + "/Machine/InsertZhusu",
method: "post",
data: params,
});
}
/**
* @param params 泡沫投料提交
*/
export function foamInputSubmit(params) {
return request({
url: baseApi + "/MachineClass/Insert",
url: baseApi + "/Ware/Insert",
method: "post",
data: params,
});
}
/**
* @param params 原料投入注塑提交
* @param params 注塑投料
*/
export function plasticsInputSubmit(params) {
return request({
url: baseApi + "/MachineClass/Insert",
url: baseApi + "/WareHouse/Insert",
method: "post",
data: params,
});

4
src/common/classify.data.js

@ -7,7 +7,7 @@ export default [{
"index": 1,
},
{
"name": "原料投入(泡沫)",
"name": "泡沫投料",
"icon": "/purchase_return.svg",
"path": "/pages/foam/input",
"index": 2,
@ -25,7 +25,7 @@ export default [{
"index": 1,
},
{
"name": "原料投入(注塑)",
"name": "注塑投料",
"icon": "/unbind_pallet.svg",
"path": "/pages/plastics/input",
"index": 2,

4
src/pages.json

@ -42,7 +42,7 @@
{
"path": "pages/foam/input",
"style": {
"navigationBarTitleText": "原料投入(泡沫)",
"navigationBarTitleText": "泡沫投料",
"enablePullDownRefresh" : false
}
},
@ -58,7 +58,7 @@
{
"path": "pages/plastics/input",
"style": {
"navigationBarTitleText": "原料投入(注塑)",
"navigationBarTitleText": "注塑投料",
"titleNView": {
"buttons": [{}]
}

19
src/pages/foam/check.vue

@ -72,14 +72,12 @@
</view>
</view>
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal>
<showModal ref="comMessage"></showModal>
</view>
</template>
<script>
import showModal from '../../mycomponents/common/showModal.vue'
import customerFrom from "@/mycomponents/form/customerFrom.vue"
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue"
import {
@ -91,11 +89,14 @@
foamCheckSubmit,
getFoamDeviceInfo
} from '@/api/request2.js';
import {
showConfirmMsg
} from "@/common/utils.js"
export default {
components: {
customerFrom,
winScanNormal,
showModal
},
data() {
return {
@ -253,7 +254,7 @@
}
// this.dataList = this.formData
this.dataList = res.Result;
this.dataList.unshift(groupSelect)
this.dataList.push(groupSelect)
this.deviceName=this.dataList[0].Name;
this.dateTime = getCurrDateTime()
@ -267,7 +268,7 @@
submit() {
if (this.deviceCode == "") {
this.deviceCheckCode=""
this.$refs.comMessage.showMessage("提示", "请先扫描设备编号")
this.showMessage("请先扫描设备编号")
return
}
this.$refs.customerFrom.submit(data => {
@ -324,7 +325,9 @@
this.deviceCheckCode=""
},
showMessage(hint){
this.$refs.comMessage.showMessage("提示", hint)
showConfirmMsg("提示", hint,callBack=>{
} )
},
onConfirmDevice(data){
if(data==undefined||data==""){
@ -348,8 +351,8 @@
SelectValue: "",
}
this.dataList = res.Result;
this.dataList.unshift(groupSelect)
this.deviceName=this.dataList[1].Name;
this.dataList.push(groupSelect)
this.deviceName=this.dataList[0].Name;
this.dateTime = getCurrDateTime()
}).catch(error => {
uni.hideLoading()

33
src/pages/foam/input.vue

@ -110,11 +110,16 @@
getMaterialLists,
foamInputSubmit
} from '@/api/request2.js';
import showModal from '../../mycomponents/common/showModal.vue'
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue"
import {
showConfirmMsg
} from "@/common/utils.js"
import {
getCurrDateTime,
} from "@/common/basic.js"
import showModal from '../../mycomponents/common/showModal.vue'
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue"
export default {
components: {
winScanNormal,
@ -174,28 +179,32 @@
var param = {
planNumber: this.planNumber,
materialName: this.materialName,
materialCode:this.materialCode,
materialQty: this.materialQty,
id:this.$store.state.user.id,
createTime:getCurrDateTime(),
}
console.log("提交", JSON.stringify(param))
// foamInputSubmit(param).then(res=>{
// uni.hideLoading()
// this.showMessage("")
// this.resetData()
// }).catch(error=>{
// uni.hideLoading()
// this.showMessage(error)
// })
foamInputSubmit(param).then(res=>{
uni.hideLoading()
this.showMessage("提交成功")
this.resetData()
}).catch(error=>{
uni.hideLoading()
this.showMessage(error)
})
},
showMessage(hint) {
this.$refs.comMessage.showMessage("提示", hint)
showConfirmMsg("提示", hint,callBack=>{
})
},
resetData() {
this.planNumber = "";
this.materialName = ""
this.materialQty = 0
this.materialQty = "";
this.materialCode=""
},
showPlanSelect() {
uni.showLoading({

22
src/pages/plastics/check.vue

@ -72,14 +72,12 @@
</view>
</view>
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal>
<showModal ref="comMessage"></showModal>
</view>
</template>
<script>
import showModal from '../../mycomponents/common/showModal.vue'
import customerFrom from "@/mycomponents/form/customerFrom.vue"
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue"
import {
@ -87,14 +85,17 @@
deepCopyData
} from "@/common/basic.js"
import {
foamCheckSubmit,
plasticsCheckSubmit,
getPlasticsDeviceInfo
} from '@/api/request2.js';
import {
showConfirmMsg
} from "@/common/utils.js"
export default {
components: {
customerFrom,
winScanNormal,
showModal
},
data() {
return {
@ -251,7 +252,6 @@
SelectName: "",
SelectValue: "",
}
// this.dataList = this.formData
this.dataList = res.Result;
this.dataList.push(groupSelect)
@ -267,7 +267,7 @@
submit() {
if (this.deviceCode == "") {
this.deviceCheckCode=""
this.$refs.comMessage.showMessage("提示", "请先扫描设备编号")
this.showMessage("请先扫描设备编号")
return
}
this.$refs.customerFrom.submit(data => {
@ -288,7 +288,7 @@
}
console.log("提交", JSON.stringify(commitData))
foamCheckSubmit(commitData).then(res=>{
plasticsCheckSubmit(commitData).then(res=>{
uni.hideLoading()
this.showMessage("提交成功")
this.clearData()
@ -324,7 +324,9 @@
this.deviceCheckCode=""
},
showMessage(hint){
this.$refs.comMessage.showMessage("提示", hint)
showConfirmMsg("提示", hint,callBack=>{
} )
},
onConfirmDevice(data){
if(data==undefined||data==""){
@ -349,8 +351,8 @@
SelectValue: "",
}
this.dataList = res.Result;
this.dataList.unshift(groupSelect)
this.deviceName=this.dataList[1].Name;
this.dataList.push(groupSelect)
this.deviceName=this.dataList[0].Name;
this.dateTime = getCurrDateTime()
}).catch(error => {
uni.hideLoading()

94
src/pages/plastics/input.vue

@ -102,11 +102,6 @@
</view>
</view>
</view>
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal>
<wz-select-popup ref="selectPopup" title="选择生产计划" @select="selectPlan" />
<showModal ref="comMessage" @confirm="confirm"></showModal>
</view>
@ -126,15 +121,17 @@
getBucketCode,
checkItemCodeByBucket
} from '@/api/request2.js';
import showModal from '../../mycomponents/common/showModal.vue'
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue"
import {
showConfirmMsg
} from "@/common/utils.js"
import {
getCurrDateTime,
} from "@/common/basic.js"
export default {
components: {
winScanNormal,
showModal
},
data() {
return {
@ -226,21 +223,6 @@
},
confirm(content) {
if (content.includes("料筒号")) {
this.$refs.inputBucketCode.focused = true
} else if (content.includes("零件号")) {
this.$refs.inputItemCode.focused = true
} else if (content.includes("批次")) {
this.$refs.inputBatchCode.focused = true
} else if (content.includes("参考")) {
this.$refs.inputReferenceCode.focused = true
} else if (content.includes("供应商")) {
this.$refs.inputSupplierCode.focused = true
} else if (content.includes("重量")) {
this.$refs.inputWeight.focused = true
}
},
onConfirmBatchCode(data) {
if (data == undefined || data == "") {
@ -335,23 +317,18 @@
createTime: getCurrDateTime(),
}
console.log("参数", param)
// uni.showLoading({
// title: "",
// mask: true
// })
// var param = {
// planNumber: this.planNumber,
// materialName: this.materialName,
// materialQty: this.materialQty
// }
// plasticsInputSubmit(param).then(res=>{
// uni.hideLoading()
// this.showMessage("")
// this.clearData()
// }).catch(error=>{
// uni.hideLoading()
// this.showMessage(error)
// })
uni.showLoading({
title: "加载中",
mask: true
})
plasticsInputSubmit(param).then(res => {
uni.hideLoading()
this.showMessage("提示","提交成功")
this.resetData()
}).catch(error => {
uni.hideLoading()
this.showMessage("提示",error)
})
},
showMessage(title, hint) {
this.$refs.inputBucketCode.focused = false
@ -360,12 +337,31 @@
this.$refs.inputReferenceCode.focused = false
this.$refs.inputSupplierCode.focused = false
this.$refs.inputWeight.focused = false
this.$refs.comMessage.showMessage(title, hint)
showConfirmMsg(title, hint, callBack => {
if (hint.includes("料筒号")) {
this.$refs.inputBucketCode.focused = true
} else if (hint.includes("零件号")) {
this.$refs.inputItemCode.focused = true
} else if (hint.includes("批次")) {
this.$refs.inputBatchCode.focused = true
} else if (hint.includes("参考")) {
this.$refs.inputReferenceCode.focused = true
} else if (hint.includes("供应商")) {
this.$refs.inputSupplierCode.focused = true
} else if (hint.includes("重量")) {
this.$refs.inputWeight.focused = true
}
})
},
resetData() {
this.planNumber = "";
this.materialName = ""
this.materialQty = 0
this.planNumber = ""
this.bucketCheckCode = ""
this.itemCheckCode = ""
this.batchCode = ""
this.referenceCode = ""
this.supplierCode = ""
this.weight = ""
},
showPlanSelect() {
uni.showLoading({
@ -403,14 +399,6 @@
console.log(data.detail.value)
},
selectPlan(mode, data) {
this.planNumber = data.PLAN_NO
this.planName = data.SHIFT_CODE
console.log(mode)
console.log(data)
},
reqGetList(data) {
// var data ={
// pageIndex:1,

Loading…
Cancel
Save