4 changed files with 182 additions and 328 deletions
@ -0,0 +1,146 @@ |
|||||
|
<template> |
||||
|
<view class=""> |
||||
|
<u-popup v-model="show" mode="bottom" border-radius="14" z-index='12'> |
||||
|
<view class="title"> |
||||
|
<view class="title-txt"> |
||||
|
需求信息 |
||||
|
</view> |
||||
|
<u-icon name="close" color="#4f4f4f" size="28"></u-icon> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<view class="label">来源库位:</view> |
||||
|
<view class="value">{{itemCode}}</view> |
||||
|
<view class="searchIcon"> |
||||
|
<image src="/static/search.svg" mode="" @click="fromLocationClick"/> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<view class="label">零件:</view> |
||||
|
<view class="value">{{itemCode}}</view> |
||||
|
<view class="searchIcon"> |
||||
|
<image src="/static/search.svg" mode="" @click="itemCodeClick"/> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<view class="label">批次:</view> |
||||
|
<view class="value">{{itemCode}}</view> |
||||
|
<view class="searchIcon"></view> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<view class="label">数量:</view> |
||||
|
<view class="value1"> |
||||
|
<u-number-box v-model="value" @change="valChange"></u-number-box> |
||||
|
<view class="uom">EA</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="uni-flex uni-row hide_border"> |
||||
|
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
||||
|
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
||||
|
</view> |
||||
|
</u-popup> |
||||
|
|
||||
|
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' |
||||
|
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
||||
|
import { |
||||
|
getBusinessType |
||||
|
} from '@/common/record.js'; |
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
winScanLocation |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
show:true, |
||||
|
businessTypeCode: "OkToHold", |
||||
|
} |
||||
|
}, |
||||
|
props: { |
||||
|
}, |
||||
|
methods: { |
||||
|
// 打开扫描来源库位组件 |
||||
|
openFromLocation(){ |
||||
|
this.$refs.scanLocationCode.openScanPopup() |
||||
|
}, |
||||
|
getLocation(location, code){ |
||||
|
console.log(location,code) |
||||
|
|
||||
|
}, |
||||
|
getBusinessTypeFunc() { |
||||
|
getBusinessType(this.businessTypeCode, res => { |
||||
|
if (res.success) { |
||||
|
this.businessType = res.businessType; |
||||
|
this.fromInventoryStatuses = res.fromInventoryStatuses.split(','); |
||||
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
||||
|
this.openFromLocation(); |
||||
|
} else { |
||||
|
this.showErrorMessage(res.message) |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.title{ |
||||
|
padding:30rpx 20rpx; |
||||
|
display: flex; |
||||
|
border-bottom:1px solid rgba(230, 230, 230, 1); |
||||
|
.title-txt{ |
||||
|
flex:1; |
||||
|
font-weight: bold; |
||||
|
font-size: 32rpx; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
.select{ |
||||
|
display: flex; |
||||
|
} |
||||
|
.border{ |
||||
|
border:1px solid rgba(230, 230, 230, 1) |
||||
|
} |
||||
|
::v-deep .u-input__right-icon__clear{ |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
color: #a7a7a7; |
||||
|
} |
||||
|
.item{ |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
padding: 20rpx; |
||||
|
border-bottom: 1px solid #dedede; |
||||
|
.value{ |
||||
|
flex:1; |
||||
|
width: 0px; |
||||
|
height: 80rpx; |
||||
|
border: 1px solid #dedede; |
||||
|
} |
||||
|
.value1{ |
||||
|
flex:1; |
||||
|
width: 0px; |
||||
|
height: 80rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.searchIcon{ |
||||
|
width: 40rpx; |
||||
|
margin-left: 20rpx; |
||||
|
image{ |
||||
|
width: 40rpx; |
||||
|
height:40rpx |
||||
|
} |
||||
|
} |
||||
|
.uom{ |
||||
|
margin-left: 10rpx; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
@ -1,327 +0,0 @@ |
|||||
<!-- 合格转隔离扫码组件 --> |
|
||||
<template> |
|
||||
<u-popup |
|
||||
v-model="show" |
|
||||
:mode="mode" |
|
||||
:mask='mask' |
|
||||
:length='length' |
|
||||
:zoom='zoom' |
|
||||
:safe-area-inset-bottom='safeAreaInsetBottom' |
|
||||
:mask-close-able='maskCloseAble' |
|
||||
:custom-style='customStyle' |
|
||||
:border-radius='borderBadius' |
|
||||
:z-index='zIndex' |
|
||||
:closeable='closeable' |
|
||||
:close-icon='closeIcon' |
|
||||
:close-icon-pos='closeIconPos' |
|
||||
:close-icon-color='closeIconColor' |
|
||||
:close-icon-size='closeIconSize' |
|
||||
:width='width' |
|
||||
:height='height' |
|
||||
:negative-top='negativeTop' |
|
||||
:mask-custom-style='maskCustomStyle' |
|
||||
:duration='duration' |
|
||||
:blur='blur' |
|
||||
@open='open' |
|
||||
@close='close' |
|
||||
> |
|
||||
<view> |
|
||||
<view class="title"> |
|
||||
<view class="title-txt"> |
|
||||
需求 |
|
||||
</view> |
|
||||
<u-icon name="close" color="#4f4f4f" size="28"></u-icon> |
|
||||
</view> |
|
||||
<u-form |
|
||||
class="form" |
|
||||
:model="allData" |
|
||||
ref="formRef" |
|
||||
:rules="rules" |
|
||||
:error-type="errorType" |
|
||||
:border-bottom="borderBottom" |
|
||||
:label-position="labelPosition" |
|
||||
:label-width="labelWidth" |
|
||||
:label-style="labelStyle" |
|
||||
:label-align="labelAlign" |
|
||||
@setRules='setRules' |
|
||||
@resetFields='resetFields' |
|
||||
@validate='validate' |
|
||||
> |
|
||||
<u-form-item |
|
||||
:label="item.label" |
|
||||
:prop="item.field" |
|
||||
v-for="(item,index) in formField" |
|
||||
:key='index' |
|
||||
:border-bottom="item.form.formItemBorderBottom == true || item.form.formItemBorderBottom == false ? item.form.formItemBorderBottom : true" |
|
||||
:label-position="item.form.formItemLabelPosition || 'left'" |
|
||||
:label-width="item.form.formItemLabelWidth || ''" |
|
||||
:label-style="item.form.formItemLabelStyle || {}" |
|
||||
:label-align="item.form.formItemLabelAlign || ''" |
|
||||
:right-icon="item.form.rightIcon || ''" |
|
||||
:left-icon="item.form.leftIcon || ''" |
|
||||
:left-icon-style="item.form.leftIconStyle || ''" |
|
||||
:right-icon-style="item.form.righIconStyle || ''" |
|
||||
:required="item.form.required || false" |
|
||||
> |
|
||||
<view :class="item.form.border ? 'border' : formItemBorder ? 'border' : ''" class="item"> |
|
||||
|
|
||||
<u-input |
|
||||
v-if="item.form.type == 'text'||item.form.type == 'password'||item.form.type == 'textarea'||item.form.type == 'number'" |
|
||||
v-model="allData[item.field]" |
|
||||
:type='item.form.type' |
|
||||
:clearable='item.form.clearable == true || item.form.clearable == false ? item.form.clearable : true' |
|
||||
:input-align="item.form.inputAlign || 'left'" |
|
||||
:placeholder="item.form.placeholder || `请输入${[item.label]}`" |
|
||||
:disabled='item.form.disabled || false' |
|
||||
:maxlength='item.form.maxlength || 140' |
|
||||
:placeholder-style='item.form.placeholderStyle || "color: #c0c4cc;"' |
|
||||
:confirm-type='item.form.confirmType ||"done"' |
|
||||
:custom-style='item.form.customStyle' |
|
||||
:focus='item.form.focus || false' |
|
||||
:fixed='item.form.fixed || false' |
|
||||
:password-icon='item.form.passwordIcon == true || item.form.passwordIcon == false ? item.form.passwordIcon : true' |
|
||||
:border-color='item.form.borderColor ? item.form.borderColor : formItemBorderColor ? formItemBorderColor : "#dcdfe6"' |
|
||||
:auto-height='item.form.autoHeight == true || item.form.autoHeight == false ? item.form.autoHeight : true' |
|
||||
:height='item.form.height' |
|
||||
:cursor-spacing='item.form.cursorSpacing' |
|
||||
:selection-start='item.form.selectionStart' |
|
||||
:selection-end='item.form.selectionEnd' |
|
||||
:show-confirmbar='item.form.showConfirmbar' |
|
||||
:adjust-position='item.form.adjustPosition' |
|
||||
/> |
|
||||
<!-- <u-input v-model="allData[item.field]" v-if="item.form.type == 'Select'"/> --> |
|
||||
<view class="select" v-if="item.form.type == 'select'"> |
|
||||
<u-input |
|
||||
v-model="allData[item.field]" |
|
||||
type='text' |
|
||||
:clearable='item.form.clearable == true || item.form.clearable == false ? item.form.clearable : true' |
|
||||
:input-align="item.form.inputAlign || 'left'" |
|
||||
:placeholder="item.form.placeholder || `请输入${[item.label]}`" |
|
||||
:disabled='item.form.disabled || false' |
|
||||
:maxlength='item.form.maxlength || 140' |
|
||||
:placeholder-style='item.form.placeholderStyle || "color: #c0c4cc;"' |
|
||||
:confirm-type='item.form.confirmType ||"done"' |
|
||||
:custom-style='item.form.customStyle' |
|
||||
:focus='item.form.focus || false' |
|
||||
:fixed='item.form.fixed || false' |
|
||||
:password-icon='item.form.passwordIcon == true || item.form.passwordIcon == false ? item.form.passwordIcon : true' |
|
||||
:border='false' |
|
||||
:border-color='item.form.borderColor ? item.form.borderColor : formItemBorderColor ? formItemBorderColor : "#dcdfe6"' |
|
||||
:auto-height='item.form.autoHeight == true || item.form.autoHeight == false ? item.form.autoHeight : true' |
|
||||
:height='item.form.height' |
|
||||
:cursor-spacing='item.form.cursorSpacing' |
|
||||
:selection-start='item.form.selectionStart' |
|
||||
:selection-end='item.form.selectionEnd' |
|
||||
:show-confirmbar='item.form.showConfirmbar' |
|
||||
:adjust-position='item.form.adjustPosition' |
|
||||
/> |
|
||||
<u-icon name="arrow-down-fill" color="#878787" size="28"></u-icon> |
|
||||
</view> |
|
||||
</view> |
|
||||
</u-form-item> |
|
||||
</u-form> |
|
||||
</view> |
|
||||
</u-popup> |
|
||||
</template> |
|
||||
<script> |
|
||||
export default { |
|
||||
components: { |
|
||||
|
|
||||
}, |
|
||||
props: { |
|
||||
// 弹窗参数 |
|
||||
mode:{ |
|
||||
type: String, |
|
||||
default: 'bottom', |
|
||||
}, |
|
||||
mask:{ |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
length:{ |
|
||||
type: String, |
|
||||
default: 'auto' |
|
||||
}, |
|
||||
zoom:{ |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
safeAreaInsetBottom:{ |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
maskCloseAble:{ |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
customStyle:{ |
|
||||
type: Number, |
|
||||
default: ()=>{} |
|
||||
}, |
|
||||
borderBadius:{ |
|
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
zIndex:{ |
|
||||
type: Number, |
|
||||
default: 10075 |
|
||||
}, |
|
||||
closeable:{ |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
closeIcon:{ |
|
||||
type: String, |
|
||||
default: 'close' |
|
||||
}, |
|
||||
closeIconPos:{ |
|
||||
type: String, |
|
||||
default: 'top-right' |
|
||||
}, |
|
||||
closeIconColor:{ |
|
||||
type: String, |
|
||||
default: '#909399' |
|
||||
}, |
|
||||
closeIconSize:{ |
|
||||
type: Number, |
|
||||
default: 30 |
|
||||
}, |
|
||||
width:{ |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
height:{ |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
negativeTop:{ |
|
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
maskCustomStyle:{ |
|
||||
type: Object, |
|
||||
default:()=>{} |
|
||||
}, |
|
||||
duration:{ |
|
||||
type: Number, |
|
||||
default: 250 |
|
||||
}, |
|
||||
blur:{ |
|
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
|
|
||||
// 表单参数 |
|
||||
// 表单字段 |
|
||||
formField:{ |
|
||||
type: Array, |
|
||||
default: ()=>[] |
|
||||
}, |
|
||||
// 数据 |
|
||||
allData:{ |
|
||||
|
|
||||
}, |
|
||||
rules:{ |
|
||||
type: Object, |
|
||||
default: ()=>{} |
|
||||
}, |
|
||||
errorType:{ |
|
||||
type: Array, |
|
||||
default:()=>['message'] |
|
||||
}, |
|
||||
borderBottom:{ |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
labelPosition:{ |
|
||||
type: String, |
|
||||
default: 'left' |
|
||||
}, |
|
||||
labelWidth:{ |
|
||||
type: Number, |
|
||||
default: 90 |
|
||||
}, |
|
||||
labelStyle:{ |
|
||||
type: Object, |
|
||||
default: ()=>{} |
|
||||
}, |
|
||||
labelAlign:{ |
|
||||
type: String, |
|
||||
default: 'left' |
|
||||
}, |
|
||||
formItemBorder :{ |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
formItemBorderColor :{ |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
show:true, |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
mounted() { |
|
||||
// this.$refs.form1.setRules(this.rules); |
|
||||
}, |
|
||||
methods: { |
|
||||
// 打开弹窗 |
|
||||
open(){ |
|
||||
|
|
||||
}, |
|
||||
// 关闭弹窗 |
|
||||
close(){ |
|
||||
|
|
||||
}, |
|
||||
// 设置校验规则 |
|
||||
setRules(){ |
|
||||
|
|
||||
}, |
|
||||
// 对整个表单进行重置,将所有字段值重置为初始值并移除校验结果 |
|
||||
resetFields(){ |
|
||||
|
|
||||
}, |
|
||||
// 对整个表单进行校验的方法 |
|
||||
validate(){ |
|
||||
|
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.form{ |
|
||||
padding: 0px 20rpx; |
|
||||
font-size: 24rpx; |
|
||||
} |
|
||||
.item{ |
|
||||
flex:1;padding: 0px 20rpx; |
|
||||
} |
|
||||
.title{ |
|
||||
padding:20rpx; |
|
||||
display: flex; |
|
||||
border-bottom:1px solid rgba(230, 230, 230, 1); |
|
||||
.title-txt{ |
|
||||
flex:1; |
|
||||
font-weight: bold; |
|
||||
font-size: 32rpx; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
.select{ |
|
||||
display: flex; |
|
||||
} |
|
||||
.border{ |
|
||||
border:1px solid rgba(230, 230, 230, 1) |
|
||||
} |
|
||||
::v-deep .u-input__right-icon__clear{ |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
justify-content: center; |
|
||||
color: #a7a7a7; |
|
||||
} |
|
||||
</style> |
|
@ -0,0 +1,35 @@ |
|||||
|
<template> |
||||
|
<!-- 合格转隔离 --> |
||||
|
<view class="page-wraper"> |
||||
|
<okToHoldRecordPack ref="okToHoldRecordPackRef" > </okToHoldRecordPack> |
||||
|
|
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import okToHoldRecordPack from '@/pages/inventoryMove/coms/okToHoldRecordPack.vue' |
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
okToHoldRecordPack |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
title:'', |
||||
|
show:true |
||||
|
} |
||||
|
}, |
||||
|
onLoad(option){ |
||||
|
this.$nextTick(()=>{ |
||||
|
this.$refs.okToHoldRecordPackRef.openFromLocation.open('bottom') |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
</style> |
Loading…
Reference in new issue