|
@ -22,12 +22,13 @@ |
|
|
<!-- <view class="" style="font-size: 35rpx;"> |
|
|
<!-- <view class="" style="font-size: 35rpx;"> |
|
|
计划单号 |
|
|
计划单号 |
|
|
</view> --> |
|
|
</view> --> |
|
|
<uni-section title="计划单号" subTitle="选择计划单号" subTitleFontSize="26rpx" titleFontSize="35rpx" type="line" > |
|
|
<uni-section title="计划单号" subTitle="选择计划单号" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
</uni-section> |
|
|
type="line"> |
|
|
|
|
|
</uni-section> |
|
|
|
|
|
|
|
|
<view class="uni-flex space-between"> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="" style="width: 80%; "> |
|
|
<view class="" style="width: 80%; "> |
|
|
<input class="input" disabled v-model="planNumber" /> |
|
|
<uni-easyinput disabled style="margin-left: 10rpx; margin-right: 10rpx;" trim="all" v-model="planNumber"></uni-easyinput> |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-flex" style="width: 20%; 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> |
|
@ -37,28 +38,35 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
<uni-section title="原料名称" subTitle="输入或者选择原料名称" subTitleFontSize="26rpx" titleFontSize="35rpx" type="line"> |
|
|
<uni-section title="原料名称" subTitle="输入或者选择原料名称" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
</uni-section> |
|
|
type="line"> |
|
|
<view class="uni-flex space-between"> |
|
|
</uni-section> |
|
|
|
|
|
<view class="uni-flex space-between uni-row u-col-center" > |
|
|
<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> |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-flex" style="width: 20%; align-items: center;"> |
|
|
<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> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
<uni-section title="原料投入量" subTitle="输入原料投入量" subTitleFontSize="26rpx" titleFontSize="35rpx" type="line"> |
|
|
<uni-section title="原料投入量" subTitle="输入原料投入量" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
</uni-section> |
|
|
type="line"> |
|
|
|
|
|
</uni-section> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="" style="width: 50%;"> |
|
|
<view class="" style="width: 50%;"> |
|
|
<input class="input" v-model="materialQty" type="digit" /> |
|
|
<uni-easyinput class="uni-mt-5" trim="all" type="digit" ref="inputQty" |
|
|
|
|
|
v-model="materialQty"></uni-easyinput> |
|
|
|
|
|
<!-- <input class="input" v-model="materialQty" type="digit" /> --> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</view> |
|
|
</view> |
|
@ -85,13 +93,13 @@ |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
<script module="render" lang="renderjs"> |
|
|
<script module="render" lang="renderjs"> |
|
|
export default { |
|
|
export default { |
|
|
methods: { |
|
|
methods: { |
|
|
_inputFocus (event) { |
|
|
_inputFocus(event) { |
|
|
document.querySelector('#inputSelect input').select() |
|
|
document.querySelector('#inputSelect input').select() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
@ -102,7 +110,7 @@ |
|
|
import { |
|
|
import { |
|
|
getPlaneNumberList, |
|
|
getPlaneNumberList, |
|
|
getMaterialLists, |
|
|
getMaterialLists, |
|
|
foamCheckSubmit |
|
|
foamInputSubmit |
|
|
} 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" |
|
@ -118,25 +126,24 @@ |
|
|
return { |
|
|
return { |
|
|
dateTime: "", |
|
|
dateTime: "", |
|
|
planNumber: "", |
|
|
planNumber: "", |
|
|
materialName:"", |
|
|
materialName: "", |
|
|
materialCode:"", |
|
|
materialCode: "", |
|
|
materialQty:"", |
|
|
materialQty: "", |
|
|
planName: "", |
|
|
planName: "", |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
userForm: { |
|
|
userForm: { |
|
|
names: [], |
|
|
names: [], |
|
|
values: [], |
|
|
values: [], |
|
|
origin: [] |
|
|
origin: [] |
|
|
} |
|
|
}, |
|
|
|
|
|
materialList:[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: {}, |
|
|
computed: {}, |
|
|
onLoad() { |
|
|
onLoad() {}, |
|
|
}, |
|
|
onUnload() {}, |
|
|
onUnload() { |
|
|
|
|
|
}, |
|
|
|
|
|
onReady() { |
|
|
onReady() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
@ -150,7 +157,7 @@ |
|
|
console.log(event.detail); |
|
|
console.log(event.detail); |
|
|
}, |
|
|
}, |
|
|
submit() { |
|
|
submit() { |
|
|
if (this.planNumber == "") { |
|
|
if (this.planNumber == "123") { |
|
|
this.showMessage("请选择计划单号") |
|
|
this.showMessage("请选择计划单号") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
@ -158,20 +165,24 @@ |
|
|
this.showMessage("请输入原料名称") |
|
|
this.showMessage("请输入原料名称") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (this.materialQty == ""||this.materialQty==0) { |
|
|
if (this.materialQty == "" || this.materialQty == 0) { |
|
|
this.showMessage("请输入原料数量") |
|
|
this.showMessage("请输入原料数量") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title:"加载中", |
|
|
title: "加载中", |
|
|
mask:true |
|
|
mask: true |
|
|
}) |
|
|
}) |
|
|
var param ={ |
|
|
var param = { |
|
|
planNumber:this.planNumber, |
|
|
planNumber: this.planNumber, |
|
|
materialName:this.materialName, |
|
|
materialName: this.materialName, |
|
|
materialQty:this.materialQty |
|
|
materialQty: this.materialQty, |
|
|
|
|
|
UserName:this.$store.state.user.id, |
|
|
|
|
|
createTime:getCurrDateTime(), |
|
|
} |
|
|
} |
|
|
// foamMaterialInputSubmit(param).then(res=>{ |
|
|
console.log("提交", JSON.stringify(param)) |
|
|
|
|
|
|
|
|
|
|
|
// foamInputSubmit(param).then(res=>{ |
|
|
// uni.hideLoading() |
|
|
// uni.hideLoading() |
|
|
// this.showMessage("提交成功") |
|
|
// this.showMessage("提交成功") |
|
|
// this.resetData() |
|
|
// this.resetData() |
|
@ -180,20 +191,20 @@ |
|
|
// this.showMessage(error) |
|
|
// this.showMessage(error) |
|
|
// }) |
|
|
// }) |
|
|
}, |
|
|
}, |
|
|
showMessage(hint){ |
|
|
showMessage(hint) { |
|
|
this.$refs.comMessage.showMessage("提示", hint) |
|
|
this.$refs.comMessage.showMessage("提示", hint) |
|
|
}, |
|
|
}, |
|
|
resetData() { |
|
|
resetData() { |
|
|
this.planNumber =""; |
|
|
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=>{ |
|
|
getPlaneNumberList().then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.$refs.selectPopup.open({ |
|
|
this.$refs.selectPopup.open({ |
|
|
mode: 'radio', //radio checkbox 单选、多选 |
|
|
mode: 'radio', //radio checkbox 单选、多选 |
|
@ -211,7 +222,7 @@ |
|
|
value: 'code' |
|
|
value: 'code' |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}).catch(error=>{ |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showMessage(error) |
|
|
this.showMessage(error) |
|
|
}) |
|
|
}) |
|
@ -269,7 +280,7 @@ |
|
|
|
|
|
|
|
|
this.$refs.selectPopupMaterial.open({ |
|
|
this.$refs.selectPopupMaterial.open({ |
|
|
mode: 'radio', //radio checkbox 单选、多选 |
|
|
mode: 'radio', //radio checkbox 单选、多选 |
|
|
dataList: getMaterialList(), //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig |
|
|
dataList: this.materialList, //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig |
|
|
// selected: this.userForm.values, //已选中的数据 |
|
|
// selected: this.userForm.values, //已选中的数据 |
|
|
// proxyConfig: { //组件内部代理请求数据配置 |
|
|
// proxyConfig: { //组件内部代理请求数据配置 |
|
|
// reqFun: this.reqGetList, //请求方法 |
|
|
// reqFun: this.reqGetList, //请求方法 |
|
@ -285,8 +296,9 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectMaterial(mode, data){ |
|
|
selectMaterial(mode, data) { |
|
|
this.materialName = data.name |
|
|
this.materialName = data.name |
|
|
|
|
|
this.$refs.inputQty.focused = true |
|
|
console.log("selectPopupMaterial") |
|
|
console.log("selectPopupMaterial") |
|
|
}, |
|
|
}, |
|
|
reqGetList(data) { |
|
|
reqGetList(data) { |
|
|