|
@@ -8,11 +8,7 @@
|
|
|
<view class="h-1" id="inputStorageIdpppp"></view>
|
|
<view class="h-1" id="inputStorageIdpppp"></view>
|
|
|
<up-form-item borderBottom label="选择包装对象" prop="inputStorageId" required>
|
|
<up-form-item borderBottom label="选择包装对象" prop="inputStorageId" required>
|
|
|
<view class="flex1">
|
|
<view class="flex1">
|
|
|
- <up-button v-if="!form.inputStorageId" @click="selectStorage" type="primary" plain>
|
|
|
|
|
- <image class="w-36 h-36 mr-10" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/select_push_icon.png" mode="widthFix" />
|
|
|
|
|
- <span>请选择您要包装的对象</span>
|
|
|
|
|
- </up-button>
|
|
|
|
|
- <view v-else class="bg-#FBFDFB card-info-block p-rtv border-#A9D7B4 b-radius">
|
|
|
|
|
|
|
+ <view class="bg-#FBFDFB card-info-block p-rtv border-#A9D7B4 b-radius">
|
|
|
<ObjectCardStorage :item="form.stroeObject" :showInOutAmount="false"></ObjectCardStorage>
|
|
<ObjectCardStorage :item="form.stroeObject" :showInOutAmount="false"></ObjectCardStorage>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -270,38 +266,6 @@ const generateBatchCode = async () => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
-// 去选择包装对象页选择包装对象,选择后返回并赋值
|
|
|
|
|
-const selectStorage = () => {
|
|
|
|
|
- uni.$on('selectStorageObject', (data: any) => {
|
|
|
|
|
- console.log(data, '---');
|
|
|
|
|
- form.value.inputStorageId = data.id;
|
|
|
|
|
- form.value.packTaskType = data.storageType;
|
|
|
|
|
- form.value.storageUseUnit = data.unit;
|
|
|
|
|
- form.value.storageUseAmount = '';
|
|
|
|
|
- form.value.capacity = '';
|
|
|
|
|
- form.value.stroeObject = data;
|
|
|
|
|
- form.value.batchSn = data?.batchCode;
|
|
|
|
|
- uni.$off('selectStorageObject');
|
|
|
|
|
- });
|
|
|
|
|
- uni.$u.route({
|
|
|
|
|
- type: 'navigateTo',
|
|
|
|
|
- url: '/plant/packaging/select-object/index',
|
|
|
|
|
- params: {
|
|
|
|
|
- emitField: 'selectStorageObject',
|
|
|
|
|
- storageType: form.value.packTaskType, // 传入当前选择的包装对象类型,种子、苗木、农资等
|
|
|
|
|
- id: form.value.inputStorageId, // 传入当前选择的包装对象id,编辑时使用,用于回显选中状态
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
-};
|
|
|
|
|
-const deleteStorage = () => {
|
|
|
|
|
- form.value.inputStorageId = '';
|
|
|
|
|
- form.value.storageUseUnit = 'kg';
|
|
|
|
|
- form.value.storageUseAmount = '';
|
|
|
|
|
- form.value.capacity = '';
|
|
|
|
|
- form.value.unit = '';
|
|
|
|
|
- form.value.stroeObject = null;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
const getStorageInfoById = async (id: string, storageType?: string | number) => {
|
|
const getStorageInfoById = async (id: string, storageType?: string | number) => {
|
|
|
const type = String(storageType || form.value.packTaskType || '');
|
|
const type = String(storageType || form.value.packTaskType || '');
|
|
|
let url = `/plt-api/app/storage/getInfo/${id}`;
|
|
let url = `/plt-api/app/storage/getInfo/${id}`;
|