|
@@ -14,21 +14,26 @@
|
|
|
|
|
|
|
|
<u-form labelPosition="left" :model="formData" :rules="rules" ref="formRef" labelWidth="240" labelAlign="right"
|
|
<u-form labelPosition="left" :model="formData" :rules="rules" ref="formRef" labelWidth="240" labelAlign="right"
|
|
|
class="baseForm">
|
|
class="baseForm">
|
|
|
- <u-form-item label="物品类型" class="required-form" borderBottom prop="assetType">
|
|
|
|
|
|
|
+ <u-form-item label="物品类型" class="required-form" borderBottom prop="assetTypeName">
|
|
|
<view :style="{ color: assetTypeName ? 'black' : '#c0c4cc' }" class="assetType_box" @click="openPicker">
|
|
<view :style="{ color: assetTypeName ? 'black' : '#c0c4cc' }" class="assetType_box" @click="openPicker">
|
|
|
{{ assetTypeName ? assetTypeName : '请选择产品类型' }}
|
|
{{ assetTypeName ? assetTypeName : '请选择产品类型' }}
|
|
|
</view>
|
|
</view>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
- <u-form-item label="入库场景" class="required-form" prop="bizType" borderBottom>
|
|
|
|
|
- <uni-data-select v-model="formData.bizType" :localdata="sceneState"></uni-data-select>
|
|
|
|
|
- <!-- <picker :disabled="!!(productList && productList.length)" @change="e => handlePicker(e, sceneState, 'bizType')" :value="pickerIndex" :range="sceneState" range-key="text">
|
|
|
|
|
- <u-input :value="sceneStateFilter(formData.bizType)" :disableColor="!!(productList && productList.length) ? '#F5F7FA' : '#fff'" placeholder="请选择" disabled type="select" />
|
|
|
|
|
- </picker>
|
|
|
|
|
- <u-icon slot="right" name="arrow-right"></u-icon> -->
|
|
|
|
|
- </u-form-item>
|
|
|
|
|
<u-form-item label="来源单据" prop="documentSource" borderBottom>
|
|
<u-form-item label="来源单据" prop="documentSource" borderBottom>
|
|
|
<u-input type="text" placeholder="请输入" v-model="formData.sourceBizNo" @click.native="goToRequisition" />
|
|
<u-input type="text" placeholder="请输入" v-model="formData.sourceBizNo" @click.native="goToRequisition" />
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
|
|
+ <u-form-item label="入库类型" class="required-form" prop="bizType" borderBottom>
|
|
|
|
|
+ <uni-data-select v-model="formData.bizType" :localdata="sceneState"
|
|
|
|
|
+ @change="changeType"></uni-data-select>
|
|
|
|
|
+ <!-- <picker :disabled="!!(productList && productList.length)"
|
|
|
|
|
+ @change="handlePicker(e, sceneState, 'bizType')" :value="pickerIndex" :range="sceneState"
|
|
|
|
|
+ range-key="text">
|
|
|
|
|
+ <u-input :value="sceneStateFilter(formData.bizType)"
|
|
|
|
|
+ :disableColor="!!(productList && productList.length) ? '#F5F7FA' : '#fff'" placeholder="请选择"
|
|
|
|
|
+ disabled type="select" />
|
|
|
|
|
+ </picker> -->
|
|
|
|
|
+ <!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
|
|
|
|
|
+ </u-form-item>
|
|
|
<u-form-item label="入库时间" prop="storageTime" borderBottom>
|
|
<u-form-item label="入库时间" prop="storageTime" borderBottom>
|
|
|
<view class="assetType_box" @click="timeShow = true">{{ storageTime ? formatter(storageTime) : '请选择' }}
|
|
<view class="assetType_box" @click="timeShow = true">{{ storageTime ? formatter(storageTime) : '请选择' }}
|
|
|
</view>
|
|
</view>
|
|
@@ -98,36 +103,59 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="item">
|
|
<view class="item">
|
|
|
<u-form-item label="批次号" :prop="`productList.${index}.batchNo`" required>
|
|
<u-form-item label="批次号" :prop="`productList.${index}.batchNo`" required>
|
|
|
- <u--input :disabled="item.isSave" placeholder="请输入" border="surround"
|
|
|
|
|
- v-model="item.batchNo"></u--input>
|
|
|
|
|
|
|
+ <!-- <u--input :disabled="item.isSave" placeholder="请输入" border="surround"
|
|
|
|
|
+ v-model="item.batchNo"></u--input> -->
|
|
|
|
|
+ <u-input :disabled="item.isSave" placeholder="请输入" style="height: 30px;"
|
|
|
|
|
+ v-model="item.batchNo" />
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="item">
|
|
<view class="item">
|
|
|
- <u-form-item label="数量" :prop="`productList.${index}.packingQuantity`" required>
|
|
|
|
|
|
|
+ <u-form-item label="数量" :prop="`productList.${index}.packingQuantity`" required
|
|
|
|
|
+ class="aa">
|
|
|
<u--input :disabled="item.isSave" placeholder="请输入" border="surround"
|
|
<u--input :disabled="item.isSave" placeholder="请输入" border="surround"
|
|
|
v-model="item.packingQuantity"
|
|
v-model="item.packingQuantity"
|
|
|
@change="computeNum(item, index, true)"></u--input>
|
|
@change="computeNum(item, index, true)"></u--input>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="item">
|
|
<view class="item">
|
|
|
- <u-form-item label="包装单位" :prop="`productList.${index}.packingUnit`" required>
|
|
|
|
|
- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
|
|
|
|
|
|
|
+ <u-form-item label="包装单位" :prop="`productList.${index}.packingUnit`" required
|
|
|
|
|
+ class="dd">
|
|
|
|
|
+ <!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
|
|
|
v-model="item.packingUnit"
|
|
v-model="item.packingUnit"
|
|
|
- @click.native="showPackingUnitPicker(item, index)"></u--input>
|
|
|
|
|
|
|
+ @click.native="showPackingUnitPicker(item, index)"></u--input> -->
|
|
|
|
|
+ <view
|
|
|
|
|
+ :style="{ color: item.packingUnit ? 'black' : '#c0c4cc',marginLeft:'9px' }"
|
|
|
|
|
+ class="assetType_box" :disabled="item.isSave"
|
|
|
|
|
+ @click="showPackingUnitPicker(item, index)">
|
|
|
|
|
+ {{ item.packingUnit ? item.packingUnit : '请选择' }}
|
|
|
|
|
+ </view>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="item">
|
|
<view class="item">
|
|
|
- <u-form-item label="仓库" :prop="`productList.${index}.warehouseId`" required>
|
|
|
|
|
- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
|
|
|
|
|
|
|
+ <u-form-item label="仓库" :prop="`productList.${index}.warehouseName`" required
|
|
|
|
|
+ class="dd ">
|
|
|
|
|
+ <!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
|
|
|
v-model="item.warehouseName"
|
|
v-model="item.warehouseName"
|
|
|
- @click.native="showWarehousePicker(index)"></u--input>
|
|
|
|
|
|
|
+ @click.native="showWarehousePicker(index)"></u--input> -->
|
|
|
|
|
+ <view
|
|
|
|
|
+ :style="{ color: item.warehouseName ? 'black' : '#c0c4cc',marginLeft:'9px' }"
|
|
|
|
|
+ class="assetType_box" :disabled="item.isSave"
|
|
|
|
|
+ @click="showWarehousePicker( index)">
|
|
|
|
|
+ {{ item.warehouseName ? item.warehouseName : '请选择' }}
|
|
|
|
|
+ </view>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="item w100">
|
|
<view class="item w100">
|
|
|
- <u-form-item label="供应商" :prop="`productList.${index}.supplierName`">
|
|
|
|
|
- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
|
|
|
|
|
|
|
+ <u-form-item label="供应商" :prop="`productList.${index}.supplierName`" class="dd">
|
|
|
|
|
+ <!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
|
|
|
v-model="item.supplierName"
|
|
v-model="item.supplierName"
|
|
|
- @click.native="showSupplierPicker(item, index)"></u--input>
|
|
|
|
|
|
|
+ @click.native="showSupplierPicker(item, index)"></u--input> -->
|
|
|
|
|
+ <view
|
|
|
|
|
+ :style="{ color: item.supplierName ? 'black' : '#c0c4cc',marginLeft:'9px' }"
|
|
|
|
|
+ class="assetType_box" :disabled="item.isSave"
|
|
|
|
|
+ @click="showSupplierPicker(item, index)">
|
|
|
|
|
+ {{ item.supplierName ? item.supplierName : '请选择' }}
|
|
|
|
|
+ </view>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="item">
|
|
<view class="item">
|
|
@@ -521,10 +549,9 @@
|
|
|
})
|
|
})
|
|
|
uni.$on('requisitionSelect', async (data, query) => {
|
|
uni.$on('requisitionSelect', async (data, query) => {
|
|
|
console.log(data)
|
|
console.log(data)
|
|
|
- console.log(query)
|
|
|
|
|
|
|
|
|
|
this.formData.sourceBizNo = query.sourceBizNo
|
|
this.formData.sourceBizNo = query.sourceBizNo
|
|
|
- this.formData.bizType = query.bizType
|
|
|
|
|
|
|
+ this.formData.bizType = parseInt(query.bizType)
|
|
|
this.formData.extInfo.assetType = query.assetType.split(',')
|
|
this.formData.extInfo.assetType = query.assetType.split(',')
|
|
|
let filterArray = this.formData.extInfo.assetType.map(item => {
|
|
let filterArray = this.formData.extInfo.assetType.map(item => {
|
|
|
return this.goodsLists.find(ite => ite.id == item).name
|
|
return this.goodsLists.find(ite => ite.id == item).name
|
|
@@ -683,7 +710,7 @@
|
|
|
this.formData.outInDetailList = this.productList
|
|
this.formData.outInDetailList = this.productList
|
|
|
let obj = uni.$u.deepClone(this.formData)
|
|
let obj = uni.$u.deepClone(this.formData)
|
|
|
// 处理物品类型assetType
|
|
// 处理物品类型assetType
|
|
|
- obj.extInfo.assetType = obj.extInfo.assetType.join(',')
|
|
|
|
|
|
|
+ obj.extInfo.assetType = obj.extInfo.assetType?.join(',')
|
|
|
// 处理仓库id
|
|
// 处理仓库id
|
|
|
let warehouseId = []
|
|
let warehouseId = []
|
|
|
let warehouseName = []
|
|
let warehouseName = []
|
|
@@ -704,7 +731,7 @@
|
|
|
obj.isSkip = 0
|
|
obj.isSkip = 0
|
|
|
}
|
|
}
|
|
|
// obj.isSkip = 1;
|
|
// obj.isSkip = 1;
|
|
|
- console.log(obj)
|
|
|
|
|
|
|
+ console.log(obj, '提交')
|
|
|
storage(obj)
|
|
storage(obj)
|
|
|
.then(async res => {
|
|
.then(async res => {
|
|
|
console.log('入库成功', res)
|
|
console.log('入库成功', res)
|
|
@@ -913,6 +940,7 @@
|
|
|
},
|
|
},
|
|
|
// 生成包装
|
|
// 生成包装
|
|
|
generateWrappers(row, productIndex, packingCodeList) {
|
|
generateWrappers(row, productIndex, packingCodeList) {
|
|
|
|
|
+ console.log('row----', row)
|
|
|
console.log('是否拆包----', row.isUnpack)
|
|
console.log('是否拆包----', row.isUnpack)
|
|
|
console.log('包装规格----', row.packingSpecificationOption)
|
|
console.log('包装规格----', row.packingSpecificationOption)
|
|
|
console.log('计量单位----', row.measureUnit)
|
|
console.log('计量单位----', row.measureUnit)
|
|
@@ -924,24 +952,28 @@
|
|
|
if (this.formData.bizType == '1') {
|
|
if (this.formData.bizType == '1') {
|
|
|
// 生产入库
|
|
// 生产入库
|
|
|
productionDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`
|
|
productionDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`
|
|
|
- this.curDateType = 'productionDate'
|
|
|
|
|
|
|
+ this.curDateType = productionDate
|
|
|
} else if (this.formData.bizType == '2') {
|
|
} else if (this.formData.bizType == '2') {
|
|
|
// 采购入库
|
|
// 采购入库
|
|
|
purchaseDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`
|
|
purchaseDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`
|
|
|
- this.curDateType = 'purchaseDate'
|
|
|
|
|
|
|
+ this.curDateType = purchaseDate
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log(this.curDateType, '----时间')
|
|
|
// 判断包装单位和计量单位是否为不拆物料层规格
|
|
// 判断包装单位和计量单位是否为不拆物料层规格
|
|
|
let packingBoolen = !!this.getDict(row.packingUnit).dictValue
|
|
let packingBoolen = !!this.getDict(row.packingUnit).dictValue
|
|
|
let measureBoolen = !!this.getDict(row.measureUnit).dictValue
|
|
let measureBoolen = !!this.getDict(row.measureUnit).dictValue
|
|
|
let num = row.packingQuantity
|
|
let num = row.packingQuantity
|
|
|
let filterArr = []
|
|
let filterArr = []
|
|
|
// 处理包装单位为KG类的情况
|
|
// 处理包装单位为KG类的情况
|
|
|
|
|
+ console.log('packingBoolen----', packingBoolen)
|
|
|
|
|
+ console.log('measureBoolen', measureBoolen)
|
|
|
if (packingBoolen) {
|
|
if (packingBoolen) {
|
|
|
filterArr = row.packingSpecificationOption.filter(item => {
|
|
filterArr = row.packingSpecificationOption.filter(item => {
|
|
|
return item.packageUnit == row.packingUnit && item.packageUnit != item.conversionUnit
|
|
return item.packageUnit == row.packingUnit && item.packageUnit != item.conversionUnit
|
|
|
})
|
|
})
|
|
|
num = Math.ceil(row.packingQuantity / filterArr[0].packageCell)
|
|
num = Math.ceil(row.packingQuantity / filterArr[0].packageCell)
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ console.log(row.isUnpack, 'sssssssssss')
|
|
|
if (row.isUnpack) {
|
|
if (row.isUnpack) {
|
|
|
if (measureBoolen) {
|
|
if (measureBoolen) {
|
|
|
// 处理包装单位不为KG类,计量单位为KG类的情况
|
|
// 处理包装单位不为KG类,计量单位为KG类的情况
|
|
@@ -1378,6 +1410,9 @@
|
|
|
// key2: 'value2',
|
|
// key2: 'value2',
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ changeType(e) {
|
|
|
|
|
+ this.formData.bizType = e
|
|
|
|
|
+ },
|
|
|
// 抬头下拉信息保存
|
|
// 抬头下拉信息保存
|
|
|
handlePicker(e, list, idKey, nameKey) {
|
|
handlePicker(e, list, idKey, nameKey) {
|
|
|
console.log('e?.detail--------------', e)
|
|
console.log('e?.detail--------------', e)
|
|
@@ -1783,15 +1818,34 @@
|
|
|
.required-form-text {
|
|
.required-form-text {
|
|
|
/deep/ .u-form-item__body__right {
|
|
/deep/ .u-form-item__body__right {
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
|
|
+ // background-color: red;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
.u-form-item__body__right__content {
|
|
.u-form-item__body__right__content {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
display: inline-block !important;
|
|
display: inline-block !important;
|
|
|
- width: 100%;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // ::v-deep .listCont .u-input {
|
|
|
|
|
+ // height: 60rpx !important;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ ::v-deep .dd .u-form-item__body__right {
|
|
|
|
|
+ border: 1px solid #e5e5e5 !important;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ line-height: 60rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .ellipsis {
|
|
|
|
|
+ max-width: 100%;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
.picList {
|
|
.picList {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -1814,7 +1868,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /deep/.picList .u-image {
|
|
|
|
|
|
|
+ /deep/ .picList .u-image {
|
|
|
margin-right: 10rpx;
|
|
margin-right: 10rpx;
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
}
|
|
@@ -2109,22 +2163,16 @@
|
|
|
|
|
|
|
|
.u-input {
|
|
.u-input {
|
|
|
border: 1px solid rgb(229, 229, 229);
|
|
border: 1px solid rgb(229, 229, 229);
|
|
|
- height: 15rpx !important;
|
|
|
|
|
|
|
+ height: 60rpx !important;
|
|
|
|
|
+ padding: 0 0 0 9px !important;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.item {
|
|
.item {
|
|
|
- width: 47%;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
margin-right: 3%;
|
|
margin-right: 3%;
|
|
|
|
|
|
|
|
- // line-height: 45rpx;
|
|
|
|
|
- // overflow: hidden;
|
|
|
|
|
- // white-space: nowrap;
|
|
|
|
|
- // text-overflow: ellipsis;
|
|
|
|
|
- // -o-text-overflow: ellipsis;
|
|
|
|
|
- // color: #000;
|
|
|
|
|
- // display: flex;
|
|
|
|
|
/deep/.u-form-item__body {
|
|
/deep/.u-form-item__body {
|
|
|
padding: 0 !important;
|
|
padding: 0 !important;
|
|
|
}
|
|
}
|