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. 24
      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) { export function foamInputSubmit(params) {
return request({ return request({
url: baseApi + "/MachineClass/Insert", url: baseApi + "/Ware/Insert",
method: "post", method: "post",
data: params, data: params,
}); });
} }
/** /**
* @param params 原料投入注塑提交 * @param params 注塑投料
*/ */
export function plasticsInputSubmit(params) { export function plasticsInputSubmit(params) {
return request({ return request({
url: baseApi + "/MachineClass/Insert", url: baseApi + "/WareHouse/Insert",
method: "post", method: "post",
data: params, data: params,
}); });

4
src/common/classify.data.js

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

4
src/pages.json

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

19
src/pages/foam/check.vue

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

33
src/pages/foam/input.vue

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

24
src/pages/plastics/check.vue

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

94
src/pages/plastics/input.vue

@ -102,11 +102,6 @@
</view> </view>
</view> </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> </view>
@ -126,15 +121,17 @@
getBucketCode, getBucketCode,
checkItemCodeByBucket checkItemCodeByBucket
} from '@/api/request2.js'; } 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 { import {
getCurrDateTime, getCurrDateTime,
} from "@/common/basic.js" } from "@/common/basic.js"
export default { export default {
components: { components: {
winScanNormal,
showModal
}, },
data() { data() {
return { 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) { onConfirmBatchCode(data) {
if (data == undefined || data == "") { if (data == undefined || data == "") {
@ -335,23 +317,18 @@
createTime: getCurrDateTime(), createTime: getCurrDateTime(),
} }
console.log("参数", param) console.log("参数", param)
// uni.showLoading({ uni.showLoading({
// title: "", title: "加载中",
// mask: true mask: true
// }) })
// var param = { plasticsInputSubmit(param).then(res => {
// planNumber: this.planNumber, uni.hideLoading()
// materialName: this.materialName, this.showMessage("提示","提交成功")
// materialQty: this.materialQty this.resetData()
// } }).catch(error => {
// plasticsInputSubmit(param).then(res=>{ uni.hideLoading()
// uni.hideLoading() this.showMessage("提示",error)
// this.showMessage("") })
// this.clearData()
// }).catch(error=>{
// uni.hideLoading()
// this.showMessage(error)
// })
}, },
showMessage(title, hint) { showMessage(title, hint) {
this.$refs.inputBucketCode.focused = false this.$refs.inputBucketCode.focused = false
@ -360,12 +337,31 @@
this.$refs.inputReferenceCode.focused = false this.$refs.inputReferenceCode.focused = false
this.$refs.inputSupplierCode.focused = false this.$refs.inputSupplierCode.focused = false
this.$refs.inputWeight.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() { resetData() {
this.planNumber = ""; this.planNumber = ""
this.materialName = "" this.bucketCheckCode = ""
this.materialQty = 0 this.itemCheckCode = ""
this.batchCode = ""
this.referenceCode = ""
this.supplierCode = ""
this.weight = ""
}, },
showPlanSelect() { showPlanSelect() {
uni.showLoading({ uni.showLoading({
@ -403,14 +399,6 @@
console.log(data.detail.value) 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) { reqGetList(data) {
// var data ={ // var data ={
// pageIndex:1, // pageIndex:1,

Loading…
Cancel
Save