|
|
@@ -14,21 +14,26 @@
|
|
|
|
|
|
<u-form labelPosition="left" :model="formData" :rules="rules" ref="formRef" labelWidth="240" labelAlign="right"
|
|
|
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">
|
|
|
{{ assetTypeName ? assetTypeName : '请选择产品类型' }}
|
|
|
</view>
|
|
|
</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-input type="text" placeholder="请输入" v-model="formData.sourceBizNo" @click.native="goToRequisition" />
|
|
|
</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>
|
|
|
<view class="assetType_box" @click="timeShow = true">{{ storageTime ? formatter(storageTime) : '请选择' }}
|
|
|
</view>
|
|
|
@@ -52,7 +57,7 @@
|
|
|
<uni-collapse-item :typeOpen="1" title="" name="collapse1" :open="true" :key="detailOpen"
|
|
|
:show-animation="true">
|
|
|
<template v-slot:title>
|
|
|
- <view class="detail-box">
|
|
|
+ <view class="detail-box flex_between">
|
|
|
<view data-v-41027c34="" class="uni-collapse-item__title-wrap">
|
|
|
<view data-v-41027c34=""
|
|
|
class="uni-collapse-item__title-box uni-collapse-item__title-box-base">
|
|
|
@@ -67,13 +72,13 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
- <u-form labelPosition="left" :model="{ productList: productList }" ref="lisrFormRef" labelWidth="120"
|
|
|
+ <u-form labelPosition="left" :model="{ productList: productList }" ref="lisrFormRef" labelWidth="160"
|
|
|
:rules="listRules" errorType="none" labelAlign="right" :labelStyle="{
|
|
|
fontSize: '28rpx'
|
|
|
}">
|
|
|
<view class="listContent">
|
|
|
<view class="listBox" v-for="(item, index) in productList" :key="index">
|
|
|
- <view class="listTit">
|
|
|
+ <view class="listTit flex_between">
|
|
|
<view class="name">{{ item.categoryName }}</view>
|
|
|
<view class="btn">
|
|
|
<u-button v-if="item.isSave" type="primary" size="small" :hairline="true" text="编辑"
|
|
|
@@ -97,51 +102,80 @@
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
- <u-form-item label="批次号" :prop="`productList.${index}.batchNo`" required>
|
|
|
- <u--input :disabled="item.isSave" placeholder="请输入" border="surround"
|
|
|
- v-model="item.batchNo"></u--input>
|
|
|
+ <u-form-item label="批次号" :prop="`productList.${index}.batchNo`"
|
|
|
+ class="required-form">
|
|
|
+ <!-- <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>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
- <u-form-item label="数量" :prop="`productList.${index}.packingQuantity`" required>
|
|
|
+ <u-form-item label="数量" :prop="`productList.${index}.packingQuantity`"
|
|
|
+ class="aa required-form">
|
|
|
<u--input :disabled="item.isSave" placeholder="请输入" border="surround"
|
|
|
v-model="item.packingQuantity"
|
|
|
@change="computeNum(item, index, true)"></u--input>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
<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`"
|
|
|
+ class="dd required-form">
|
|
|
+ <!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
|
|
|
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>
|
|
|
</view>
|
|
|
<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`"
|
|
|
+ class="dd required-form">
|
|
|
+ <!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
|
|
|
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>
|
|
|
</view>
|
|
|
<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"
|
|
|
- @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>
|
|
|
</view>
|
|
|
- <view class="item">
|
|
|
- <u-form-item label="计量数量"
|
|
|
- prop="measureQuantity">{{ item.measureQuantity }}</u-form-item>
|
|
|
- </view>
|
|
|
- <view class="item">
|
|
|
- <u-form-item label="计量单位" prop="measureUnit">{{ item.measureUnit }}</u-form-item>
|
|
|
- </view>
|
|
|
- <view class="item">
|
|
|
- <u-form-item label="重量" prop="weight">{{ item.weight }}</u-form-item>
|
|
|
+ <view class="flex_between w100">
|
|
|
+ <view class="item">
|
|
|
+ <u-form-item label="计量数量"
|
|
|
+ prop="measureQuantity">{{ item.measureQuantity }}</u-form-item>
|
|
|
+ </view>
|
|
|
+ <view class="item">
|
|
|
+ <u-form-item label="计量单位"
|
|
|
+ prop="measureUnit">{{ item.measureUnit }}</u-form-item>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="item">
|
|
|
- <u-form-item label="重量单位" prop="weightUnit">{{ item.weightUnit }}</u-form-item>
|
|
|
+ <view class="flex_between w100">
|
|
|
+ <view class="item">
|
|
|
+ <u-form-item label="重量" prop="weight">{{ item.weight }}</u-form-item>
|
|
|
+ </view>
|
|
|
+ <view class="item">
|
|
|
+ <u-form-item label="重量单位" prop="weightUnit">{{ item.weightUnit }}</u-form-item>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<u-form-item label="是否拆包"
|
|
|
@@ -153,7 +187,8 @@
|
|
|
<view class="timeBox">
|
|
|
<u-button class="firstBtn" size="small" type="primary" text="选择时间类型"
|
|
|
@click="timeTypeShow = true"></u-button>
|
|
|
- <u-button type="warning" size="small" :text="`批量设置${curDateTypeLabel[curDateType]}`"
|
|
|
+ <u-button type="warning" size="small"
|
|
|
+ :text="`批量设置${curDateType?curDateTypeLabel[curDateType]:''}`"
|
|
|
@click="typeTimeClick(index)"></u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -521,10 +556,9 @@
|
|
|
})
|
|
|
uni.$on('requisitionSelect', async (data, query) => {
|
|
|
console.log(data)
|
|
|
- console.log(query)
|
|
|
|
|
|
this.formData.sourceBizNo = query.sourceBizNo
|
|
|
- this.formData.bizType = query.bizType
|
|
|
+ this.formData.bizType = parseInt(query.bizType)
|
|
|
this.formData.extInfo.assetType = query.assetType.split(',')
|
|
|
let filterArray = this.formData.extInfo.assetType.map(item => {
|
|
|
return this.goodsLists.find(ite => ite.id == item).name
|
|
|
@@ -683,7 +717,7 @@
|
|
|
this.formData.outInDetailList = this.productList
|
|
|
let obj = uni.$u.deepClone(this.formData)
|
|
|
// 处理物品类型assetType
|
|
|
- obj.extInfo.assetType = obj.extInfo.assetType.join(',')
|
|
|
+ obj.extInfo.assetType = obj.extInfo.assetType?.join(',')
|
|
|
// 处理仓库id
|
|
|
let warehouseId = []
|
|
|
let warehouseName = []
|
|
|
@@ -704,7 +738,7 @@
|
|
|
obj.isSkip = 0
|
|
|
}
|
|
|
// obj.isSkip = 1;
|
|
|
- console.log(obj)
|
|
|
+ console.log(obj, '提交')
|
|
|
storage(obj)
|
|
|
.then(async res => {
|
|
|
console.log('入库成功', res)
|
|
|
@@ -913,6 +947,7 @@
|
|
|
},
|
|
|
// 生成包装
|
|
|
generateWrappers(row, productIndex, packingCodeList) {
|
|
|
+ console.log('row----', row)
|
|
|
console.log('是否拆包----', row.isUnpack)
|
|
|
console.log('包装规格----', row.packingSpecificationOption)
|
|
|
console.log('计量单位----', row.measureUnit)
|
|
|
@@ -924,24 +959,28 @@
|
|
|
if (this.formData.bizType == '1') {
|
|
|
// 生产入库
|
|
|
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') {
|
|
|
// 采购入库
|
|
|
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 measureBoolen = !!this.getDict(row.measureUnit).dictValue
|
|
|
let num = row.packingQuantity
|
|
|
let filterArr = []
|
|
|
// 处理包装单位为KG类的情况
|
|
|
+ console.log('packingBoolen----', packingBoolen)
|
|
|
+ console.log('measureBoolen', measureBoolen)
|
|
|
if (packingBoolen) {
|
|
|
filterArr = row.packingSpecificationOption.filter(item => {
|
|
|
return item.packageUnit == row.packingUnit && item.packageUnit != item.conversionUnit
|
|
|
})
|
|
|
num = Math.ceil(row.packingQuantity / filterArr[0].packageCell)
|
|
|
} else {
|
|
|
+ console.log(row.isUnpack, 'sssssssssss')
|
|
|
if (row.isUnpack) {
|
|
|
if (measureBoolen) {
|
|
|
// 处理包装单位不为KG类,计量单位为KG类的情况
|
|
|
@@ -1378,6 +1417,9 @@
|
|
|
// key2: 'value2',
|
|
|
})
|
|
|
},
|
|
|
+ changeType(e) {
|
|
|
+ this.formData.bizType = e
|
|
|
+ },
|
|
|
// 抬头下拉信息保存
|
|
|
handlePicker(e, list, idKey, nameKey) {
|
|
|
console.log('e?.detail--------------', e)
|
|
|
@@ -1773,25 +1815,44 @@
|
|
|
<style lang="scss" scoped>
|
|
|
.mainBox {
|
|
|
padding-bottom: 120rpx;
|
|
|
+ }
|
|
|
|
|
|
- /deep/.required-form .u-form-item__body__left__content__label::before {
|
|
|
- content: '*';
|
|
|
- color: red;
|
|
|
- }
|
|
|
+ /deep/.required-form .u-form-item__body__left__content__label::before {
|
|
|
+ content: '*';
|
|
|
+ color: red;
|
|
|
}
|
|
|
|
|
|
.required-form-text {
|
|
|
/deep/ .u-form-item__body__right {
|
|
|
overflow: hidden;
|
|
|
+ // background-color: red;
|
|
|
+
|
|
|
|
|
|
.u-form-item__body__right__content {
|
|
|
width: 100%;
|
|
|
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 {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -1814,7 +1875,7 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /deep/.picList .u-image {
|
|
|
+ /deep/ .picList .u-image {
|
|
|
margin-right: 10rpx;
|
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
|
@@ -1825,8 +1886,6 @@
|
|
|
|
|
|
.detail-box {
|
|
|
position: relative;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
align-items: center;
|
|
|
|
|
|
/deep/uni-button {
|
|
|
@@ -1885,8 +1944,6 @@
|
|
|
|
|
|
.listTit {
|
|
|
width: 100%;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
align-items: center;
|
|
|
|
|
|
/deep/uni-button {
|
|
|
@@ -1905,7 +1962,8 @@
|
|
|
white-space: nowrap;
|
|
|
-o-text-overflow: ellipsis;
|
|
|
text-overflow: ellipsis;
|
|
|
- font-size: 24rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.btn {
|
|
|
@@ -2109,22 +2167,16 @@
|
|
|
|
|
|
.u-input {
|
|
|
border: 1px solid rgb(229, 229, 229);
|
|
|
- height: 15rpx !important;
|
|
|
+ height: 60rpx !important;
|
|
|
+ padding: 0 0 0 9px !important;
|
|
|
}
|
|
|
|
|
|
.item {
|
|
|
- width: 47%;
|
|
|
+ width: 100%;
|
|
|
font-size: 28rpx;
|
|
|
margin-bottom: 10rpx;
|
|
|
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 {
|
|
|
padding: 0 !important;
|
|
|
}
|
|
|
@@ -2206,4 +2258,9 @@
|
|
|
.top-css {
|
|
|
border-bottom: 1px solid rgb(207, 204, 204);
|
|
|
}
|
|
|
+
|
|
|
+ .flex_between {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
</style>
|