781 lines
29 KiB
JavaScript
781 lines
29 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../../common/vendor.js");
|
|
const utils_api = require("../../../utils/api.js");
|
|
const utils_tools = require("../../../utils/tools.js");
|
|
const stores_scancode = require("../../../stores/scancode.js");
|
|
if (!Array) {
|
|
const _easycom_selectOperation2 = common_vendor.resolveComponent("selectOperation");
|
|
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
|
|
const _easycom_selectComponentType2 = common_vendor.resolveComponent("selectComponentType");
|
|
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
|
const _easycom_uni_swipe_action_item2 = common_vendor.resolveComponent("uni-swipe-action-item");
|
|
const _easycom_uni_swipe_action2 = common_vendor.resolveComponent("uni-swipe-action");
|
|
const _easycom_uni_section2 = common_vendor.resolveComponent("uni-section");
|
|
const _easycom_uni_number_box2 = common_vendor.resolveComponent("uni-number-box");
|
|
const _easycom_uni_data_select2 = common_vendor.resolveComponent("uni-data-select");
|
|
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
|
|
const _easycom_c_uni_goods_nav2 = common_vendor.resolveComponent("c-uni-goods-nav");
|
|
(_easycom_selectOperation2 + _easycom_uni_forms_item2 + _easycom_selectComponentType2 + _easycom_uni_icons2 + _easycom_uni_swipe_action_item2 + _easycom_uni_swipe_action2 + _easycom_uni_section2 + _easycom_uni_number_box2 + _easycom_uni_data_select2 + _easycom_uni_forms2 + _easycom_c_uni_goods_nav2)();
|
|
}
|
|
const _easycom_selectOperation = () => "../../../components/selectOperation/selectOperation.js";
|
|
const _easycom_uni_forms_item = () => "../../../node-modules/@dcloudio/uni-ui/lib/uni-forms-item/uni-forms-item.js";
|
|
const _easycom_selectComponentType = () => "../../../components/selectComponentType/selectComponentType.js";
|
|
const _easycom_uni_icons = () => "../../../node-modules/@dcloudio/uni-ui/lib/uni-icons/uni-icons.js";
|
|
const _easycom_uni_swipe_action_item = () => "../../../node-modules/@dcloudio/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.js";
|
|
const _easycom_uni_swipe_action = () => "../../../node-modules/@dcloudio/uni-ui/lib/uni-swipe-action/uni-swipe-action.js";
|
|
const _easycom_uni_section = () => "../../../node-modules/@dcloudio/uni-ui/lib/uni-section/uni-section.js";
|
|
const _easycom_uni_number_box = () => "../../../node-modules/@dcloudio/uni-ui/lib/uni-number-box/uni-number-box.js";
|
|
const _easycom_uni_data_select = () => "../../../node-modules/@dcloudio/uni-ui/lib/uni-data-select/uni-data-select.js";
|
|
const _easycom_uni_forms = () => "../../../node-modules/@dcloudio/uni-ui/lib/uni-forms/uni-forms.js";
|
|
const _easycom_c_uni_goods_nav = () => "../../../components/c-uni-goods-nav/c-uni-goods-nav.js";
|
|
if (!Math) {
|
|
(_easycom_selectOperation + _easycom_uni_forms_item + _easycom_selectComponentType + _easycom_uni_icons + _easycom_uni_swipe_action_item + _easycom_uni_swipe_action + _easycom_uni_section + _easycom_uni_number_box + _easycom_uni_data_select + _easycom_uni_forms + _easycom_c_uni_goods_nav)();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "outdetails",
|
|
setup(__props) {
|
|
const scancode = stores_scancode.useScanCodeStore();
|
|
const baseForm = common_vendor.ref(null);
|
|
const readOnly = common_vendor.ref(false);
|
|
const readOnly1 = common_vendor.ref(false);
|
|
const userInfo = common_vendor.ref(null);
|
|
const componentOutRecordId = common_vendor.ref("");
|
|
const baseFormData = common_vendor.ref({
|
|
"componentOutRecordId": "",
|
|
"owningRegion": "",
|
|
"componentType": "",
|
|
"outQuantity": 0,
|
|
"oldComponentHandleOption": "",
|
|
"createdUser": "",
|
|
"createdAt": "",
|
|
"state": "0",
|
|
"updateUser": "",
|
|
"updateAt": "",
|
|
"enterQuantity": 0
|
|
});
|
|
let navOptions = common_vendor.reactive([{
|
|
icon: "download",
|
|
text: "暂存",
|
|
disable: false
|
|
}, {
|
|
icon: "closeempty",
|
|
text: "取消",
|
|
disable: false
|
|
}]);
|
|
let navButtonGroup = common_vendor.reactive([{
|
|
text: "出库",
|
|
backgroundColor: "#0078D4",
|
|
color: "#fff",
|
|
disable: false
|
|
}]);
|
|
const componentHandleOptionRange = [
|
|
{ value: "报废", text: "报废" },
|
|
{ value: "返修", text: "返修" }
|
|
];
|
|
const componentHandleOptionChange = (value) => {
|
|
baseFormData.value.oldComponentHandleOption = value;
|
|
};
|
|
common_vendor.onMounted(() => {
|
|
if (!utils_tools.isNullOrEmpty(componentOutRecordId.value)) {
|
|
loadData();
|
|
}
|
|
});
|
|
common_vendor.onLoad((options) => {
|
|
if (options.componentOutRecordId) {
|
|
componentOutRecordId.value = options.componentOutRecordId;
|
|
}
|
|
userInfo.value = common_vendor.index.getStorageSync("userInfo");
|
|
});
|
|
common_vendor.onShow(() => {
|
|
if (!utils_tools.isNullOrEmpty(scancode.code)) {
|
|
const arr = scancode.code;
|
|
for (let i = 0; i < arr.length; i++) {
|
|
if (scancode.type == "outBattery") {
|
|
const oneBattery = {
|
|
"batteryEnterRecordId": "",
|
|
"componentOutRecordId": componentOutRecordId.value,
|
|
"batteryCode": arr[i]
|
|
};
|
|
listBatteryData.value.push(oneBattery);
|
|
baseFormData.value.outQuantity = listBatteryData.value.length;
|
|
} else if (scancode.type == "outHelmet") {
|
|
const oneHelmet = {
|
|
"helmetEnterRecordId": "",
|
|
"componentOutRecordId": componentOutRecordId.value,
|
|
"helmetCode": arr[i]
|
|
};
|
|
listHelmetData.value.push(oneHelmet);
|
|
baseFormData.value.outQuantity = listHelmetData.value.length;
|
|
} else if (scancode.type == "inBattery") {
|
|
const oneBattery = {
|
|
"batteryEnterRecordId": "",
|
|
"componentOutRecordId": componentOutRecordId.value,
|
|
"batteryCode": arr[i]
|
|
};
|
|
listInBatteryData.value.push(oneBattery);
|
|
baseFormData.value.enterQuantity = listInBatteryData.value.length;
|
|
} else if (scancode.type == "inHelmet") {
|
|
const oneHelmet = {
|
|
"helmetEnterRecordId": "",
|
|
"componentOutRecordId": componentOutRecordId.value,
|
|
"helmetCode": arr[i]
|
|
};
|
|
listInHelmetData.value.push(oneHelmet);
|
|
baseFormData.value.enterQuantity = listInHelmetData.value.length;
|
|
} else
|
|
break;
|
|
}
|
|
scancode.clearCode();
|
|
}
|
|
});
|
|
const loadData = () => {
|
|
utils_api.callOperateApi("ebikeComponentOutRecords/getInfo?id=" + componentOutRecordId.value, {}, "get").then((res) => {
|
|
if (res.code === 200) {
|
|
baseFormData.value = res.data;
|
|
if (baseFormData.value.componentType == "262711452730000") {
|
|
getBatteryList(baseFormData.value.componentOutRecordId);
|
|
getInBatteryList(baseFormData.value.componentOutRecordId);
|
|
} else if (baseFormData.value.componentType == "262711452730001") {
|
|
getHelmetList(baseFormData.value.componentOutRecordId);
|
|
getInHelmetList(baseFormData.value.componentOutRecordId);
|
|
}
|
|
if (baseFormData.value.state != "0") {
|
|
readOnly.value = true;
|
|
readOnly1.value = true;
|
|
if (baseFormData.value.state == "1") {
|
|
readOnly1.value = false;
|
|
navOptions = [];
|
|
navButtonGroup[0].text = "归还";
|
|
} else {
|
|
navOptions[0].disable = true;
|
|
navOptions[1].disable = true;
|
|
navButtonGroup[0].disable = true;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
};
|
|
const listBatteryData = common_vendor.ref([]);
|
|
const listHelmetData = common_vendor.ref([]);
|
|
const getBatteryList = (componentOutRecordId2, pageNo = 1, pageSize = 100) => {
|
|
const params = {
|
|
"componentOutRecordId": componentOutRecordId2,
|
|
"pageParam": {
|
|
"pageNum": pageNo,
|
|
"pageSize": pageSize
|
|
}
|
|
};
|
|
utils_api.callOperateApi("ebikeBatteryOutRecords/list", params).then((res) => {
|
|
if (res.code === 200) {
|
|
listBatteryData.value.push(...res.data.records);
|
|
baseFormData.value.outQuantity = listBatteryData.value.length;
|
|
if (res.data.totalRow > pageNo * pageSize) {
|
|
pageNo += 1;
|
|
getBatteryList(componentOutRecordId2, pageNo, pageSize);
|
|
}
|
|
}
|
|
});
|
|
};
|
|
const getHelmetList = (componentOutRecordId2, pageNo = 1, pageSize = 100) => {
|
|
const params = {
|
|
"componentOutRecordId": componentOutRecordId2,
|
|
"pageParam": {
|
|
"pageNum": pageNo,
|
|
"pageSize": pageSize
|
|
}
|
|
};
|
|
utils_api.callOperateApi("ebikeHelmetOutRecords/list", params).then((res) => {
|
|
if (res.code === 200) {
|
|
listHelmetData.value.push(...res.data.records);
|
|
baseFormData.value.outQuantity = listHelmetData.value.length;
|
|
if (res.data.totalRow > pageNo * pageSize) {
|
|
pageNo += 1;
|
|
getHelmetList(componentOutRecordId2, pageNo, pageSize);
|
|
}
|
|
}
|
|
});
|
|
};
|
|
const listInBatteryData = common_vendor.ref([]);
|
|
const listInHelmetData = common_vendor.ref([]);
|
|
const getInBatteryList = (componentOutRecordId2, pageNo = 1, pageSize = 100) => {
|
|
const params = {
|
|
"componentEnterRecordId": componentOutRecordId2,
|
|
"pageParam": {
|
|
"pageNum": pageNo,
|
|
"pageSize": pageSize
|
|
}
|
|
};
|
|
utils_api.callOperateApi("ebikeBatteryEnterRecords/list", params).then((res) => {
|
|
if (res.code === 200) {
|
|
listInBatteryData.value.push(...res.data.records);
|
|
baseFormData.value.enterQuantity = listInBatteryData.value.length;
|
|
if (res.data.totalRow > pageNo * pageSize) {
|
|
pageNo += 1;
|
|
getInBatteryList(componentOutRecordId2, pageNo, pageSize);
|
|
}
|
|
}
|
|
});
|
|
};
|
|
const getInHelmetList = (componentOutRecordId2, pageNo = 1, pageSize = 100) => {
|
|
const params = {
|
|
"componentEnterRecordId": componentOutRecordId2,
|
|
"pageParam": {
|
|
"pageNum": pageNo,
|
|
"pageSize": pageSize
|
|
}
|
|
};
|
|
utils_api.callOperateApi("ebikeHelmetEnterRecords/list", params).then((res) => {
|
|
if (res.code === 200) {
|
|
listInHelmetData.value.push(...res.data.records);
|
|
baseFormData.value.enterQuantity = listInHelmetData.value.length;
|
|
if (res.data.totalRow > pageNo * pageSize) {
|
|
pageNo += 1;
|
|
getInHelmetList(componentOutRecordId2, pageNo, pageSize);
|
|
}
|
|
}
|
|
});
|
|
};
|
|
const navOptionsClick = (e) => {
|
|
const index = e.index;
|
|
if (index == 0) {
|
|
handleSubmit("0");
|
|
} else if (index == 1) {
|
|
handleSubmit("-1");
|
|
}
|
|
};
|
|
const navButtonClick = (e) => {
|
|
const index = e.index;
|
|
if (index == 0) {
|
|
if (baseForm.value) {
|
|
baseForm.value.validate().then((res) => {
|
|
if (baseFormData.value.state == "1") {
|
|
if (baseFormData.value.componentType == "262711452730000") {
|
|
if (listInBatteryData.value.length == 0) {
|
|
utils_tools.showModelMessage("归还电池列表不能为空!");
|
|
return false;
|
|
}
|
|
}
|
|
if (baseFormData.value.componentType == "262711452730001") {
|
|
if (listInHelmetData.value.length == 0) {
|
|
utils_tools.showModelMessage("归还头盔列表不能为空!");
|
|
return false;
|
|
}
|
|
}
|
|
handleSubmit("2");
|
|
} else {
|
|
if (baseFormData.value.componentType == "262711452730000") {
|
|
if (listBatteryData.value.length == 0) {
|
|
utils_tools.showModelMessage("电池列表不能为空!");
|
|
return false;
|
|
}
|
|
}
|
|
if (baseFormData.value.componentType == "262711452730001") {
|
|
if (listHelmetData.value.length == 0) {
|
|
utils_tools.showModelMessage("头盔列表不能为空!");
|
|
return false;
|
|
}
|
|
}
|
|
handleSubmit("1");
|
|
}
|
|
}).catch((err) => {
|
|
});
|
|
}
|
|
}
|
|
};
|
|
const handleSubmit = (state) => {
|
|
let sucessMsg = "保存成功";
|
|
let errorMsg = "保存失败";
|
|
if (state == "-1") {
|
|
sucessMsg = "取消成功";
|
|
errorMsg = "取消失败";
|
|
baseFormData.value.state = "-1";
|
|
} else if (state == "1") {
|
|
sucessMsg = "出库成功";
|
|
errorMsg = "出库失败";
|
|
baseFormData.value.state = "1";
|
|
} else if (state == "2") {
|
|
sucessMsg = "归还成功";
|
|
errorMsg = "归还失败";
|
|
baseFormData.value.state = "2";
|
|
}
|
|
const params = baseFormData.value;
|
|
saveBaseInfo((bresult) => {
|
|
if (!bresult) {
|
|
common_vendor.index.showToast({
|
|
title: errorMsg,
|
|
icon: "error",
|
|
duration: 5e3
|
|
});
|
|
} else {
|
|
if (params.componentType == "262711452730000") {
|
|
saveBatteryData((bresult1) => {
|
|
if (!bresult1) {
|
|
common_vendor.index.showToast({
|
|
title: errorMsg,
|
|
icon: "error",
|
|
duration: 5e3
|
|
});
|
|
} else {
|
|
saveInBatteryData((bresult2) => {
|
|
if (!bresult2) {
|
|
common_vendor.index.showToast({
|
|
title: errorMsg,
|
|
icon: "error",
|
|
duration: 5e3
|
|
});
|
|
} else {
|
|
common_vendor.index.showToast({
|
|
title: sucessMsg,
|
|
icon: "success",
|
|
duration: 1e3,
|
|
success: (res) => {
|
|
if (params.state != "0") {
|
|
setTimeout(function() {
|
|
common_vendor.index.navigateBack();
|
|
}, 1e3);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
});
|
|
} else if (params.componentType == "262711452730001") {
|
|
saveHelmetData((bresult1) => {
|
|
if (!bresult1) {
|
|
common_vendor.index.showToast({
|
|
title: errorMsg,
|
|
icon: "error",
|
|
duration: 5e3
|
|
});
|
|
} else {
|
|
saveInHelmetData((bresult2) => {
|
|
if (!bresult2) {
|
|
common_vendor.index.showToast({
|
|
title: errorMsg,
|
|
icon: "error",
|
|
duration: 5e3
|
|
});
|
|
} else {
|
|
common_vendor.index.showToast({
|
|
title: sucessMsg,
|
|
icon: "success",
|
|
duration: 1e3,
|
|
success: (res) => {
|
|
if (params.state != "0") {
|
|
setTimeout(function() {
|
|
common_vendor.index.navigateBack();
|
|
}, 1e3);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
});
|
|
} else {
|
|
common_vendor.index.showToast({
|
|
title: sucessMsg,
|
|
icon: "success",
|
|
duration: 1e3,
|
|
success: (res) => {
|
|
if (params.state != "0") {
|
|
setTimeout(function() {
|
|
common_vendor.index.navigateBack();
|
|
}, 1e3);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
};
|
|
const saveBaseInfo = (callback) => {
|
|
const params = baseFormData.value;
|
|
if (utils_tools.isNullOrEmpty(baseFormData.value.createdUser))
|
|
baseFormData.value.createdUser = userInfo.value.username;
|
|
if (utils_tools.isNullOrEmpty(baseFormData.value.createdAt))
|
|
baseFormData.value.createdAt = utils_tools.dataFormat(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss");
|
|
if (!utils_tools.isNullOrEmpty(componentOutRecordId.value)) {
|
|
baseFormData.value.updateUser = userInfo.value.username;
|
|
baseFormData.value.updateAt = utils_tools.dataFormat(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss");
|
|
utils_api.callOperateApi("ebikeComponentOutRecords/update", params).then((res) => {
|
|
if (res.code == "200")
|
|
callback(true);
|
|
else
|
|
callback(false);
|
|
});
|
|
} else {
|
|
utils_api.callOperateApi("ebikeComponentOutRecords/save", params).then((res) => {
|
|
if (res.code == "200") {
|
|
componentOutRecordId.value = res.data;
|
|
callback(true);
|
|
} else
|
|
callback(false);
|
|
});
|
|
}
|
|
};
|
|
const saveBatteryData = (callback) => {
|
|
const listdatas = [];
|
|
listBatteryData.value.forEach((item, index) => {
|
|
listdatas.push(item.batteryCode);
|
|
});
|
|
const params = {
|
|
componentOutRecordId: componentOutRecordId.value,
|
|
batteryCodes: listdatas
|
|
};
|
|
utils_api.callOperateApi("ebikeBatteryOutRecords/batchSaveByComponentOutRecordId", params).then((res) => {
|
|
if (res.code == "200") {
|
|
callback(true);
|
|
} else {
|
|
callback(false);
|
|
}
|
|
});
|
|
};
|
|
const saveHelmetData = (callback) => {
|
|
const listdatas = [];
|
|
listHelmetData.value.forEach((item, index) => {
|
|
listdatas.push(item.helmetCode);
|
|
});
|
|
const params = {
|
|
componentOutRecordId: componentOutRecordId.value,
|
|
helmetCodes: listdatas
|
|
};
|
|
utils_api.callOperateApi("ebikeHelmetOutRecords/batchSaveByComponentOutRecordId", params).then((res) => {
|
|
if (res.code == "200") {
|
|
callback(true);
|
|
} else {
|
|
callback(false);
|
|
}
|
|
});
|
|
};
|
|
const saveInBatteryData = (callback) => {
|
|
const listdatas = [];
|
|
listInBatteryData.value.forEach((item, index) => {
|
|
listdatas.push(item.batteryCode);
|
|
});
|
|
const params = {
|
|
componentEnterRecordId: componentOutRecordId.value,
|
|
batteryCodes: listdatas
|
|
};
|
|
utils_api.callOperateApi("ebikeBatteryEnterRecords/batchSaveByComponentEnterRecordId", params).then((res) => {
|
|
if (res.code == "200") {
|
|
callback(true);
|
|
} else {
|
|
callback(false);
|
|
}
|
|
});
|
|
};
|
|
const saveInHelmetData = (callback) => {
|
|
const listdatas = [];
|
|
listInHelmetData.value.forEach((item, index) => {
|
|
listdatas.push(item.helmetCode);
|
|
});
|
|
const params = {
|
|
componentEnterRecordId: componentOutRecordId.value,
|
|
helmetCodes: listdatas
|
|
};
|
|
utils_api.callOperateApi("ebikeHelmetEnterRecords/batchSaveByComponentEnterRecordId", params).then((res) => {
|
|
if (res.code == "200") {
|
|
callback(true);
|
|
} else {
|
|
callback(false);
|
|
}
|
|
});
|
|
};
|
|
const listBatteryOptions = common_vendor.reactive([{
|
|
text: "删除",
|
|
style: {
|
|
backgroundColor: "#007aff"
|
|
}
|
|
}]);
|
|
const listHelmetOptions = common_vendor.reactive([{
|
|
text: "删除",
|
|
style: {
|
|
backgroundColor: "#007aff"
|
|
}
|
|
}]);
|
|
const onBatteryListClick = (e, index, item) => {
|
|
if (e.position == "right") {
|
|
if (e.index == 0) {
|
|
if (index != -1) {
|
|
listBatteryData.value.splice(index, 1);
|
|
baseFormData.value.outQuantity = listBatteryData.value.length;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
const onHelmetListClick = (e, index, item) => {
|
|
if (e.position == "right") {
|
|
if (e.index == 0) {
|
|
if (index != -1) {
|
|
listHelmetData.value.splice(index, 1);
|
|
baseFormData.value.outQuantity = listHelmetData.value.length;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
const onBatteryScanClick = (e) => {
|
|
common_vendor.index.navigateTo({
|
|
url: `/pages/common/batchscancode?type=outBattery`
|
|
//
|
|
});
|
|
};
|
|
const onHelmetScanClick = (e) => {
|
|
common_vendor.index.navigateTo({
|
|
url: `/pages/common/batchscancode?type=outHelmet`
|
|
//
|
|
});
|
|
};
|
|
const listInBatteryOptions = common_vendor.ref([{
|
|
text: "删除",
|
|
style: {
|
|
backgroundColor: "#007aff"
|
|
}
|
|
}]);
|
|
const listInHelmetOptions = common_vendor.ref([{
|
|
text: "删除",
|
|
style: {
|
|
backgroundColor: "#007aff"
|
|
}
|
|
}]);
|
|
const onInBatteryListClick = (e, index, item) => {
|
|
if (e.position == "right") {
|
|
if (e.index == 0) {
|
|
if (index != -1) {
|
|
listInBatteryData.value.splice(index, 1);
|
|
baseFormData.value.enterQuantity = listInBatteryData.value.length;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
const onInHelmetListClick = (e, index, item) => {
|
|
if (e.position == "right") {
|
|
if (e.index == 0) {
|
|
if (index != -1) {
|
|
listInHelmetData.value.splice(index, 1);
|
|
baseFormData.value.enterQuantity = listInHelmetData.value.length;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
const onInBatteryScanClick = (e) => {
|
|
common_vendor.index.navigateTo({
|
|
url: `/pages/common/batchscancode?type=inBattery`
|
|
//
|
|
});
|
|
};
|
|
const onInHelmetScanClick = (e) => {
|
|
common_vendor.index.navigateTo({
|
|
url: `/pages/common/batchscancode?type=inHelmet`
|
|
//
|
|
});
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return common_vendor.e({
|
|
a: common_vendor.o(($event) => baseFormData.value.owningRegion = $event),
|
|
b: common_vendor.p({
|
|
placeholder: "请选择所属区域",
|
|
disabled: readOnly.value,
|
|
modelValue: baseFormData.value.owningRegion
|
|
}),
|
|
c: common_vendor.p({
|
|
label: "所属区域",
|
|
required: true,
|
|
name: "owningRegion",
|
|
rules: [{
|
|
required: true,
|
|
errorMessage: "请输入所属区域"
|
|
}]
|
|
}),
|
|
d: common_vendor.o(($event) => baseFormData.value.componentType = $event),
|
|
e: common_vendor.p({
|
|
placeholder: "请选择部件",
|
|
disabled: readOnly.value,
|
|
modelValue: baseFormData.value.componentType
|
|
}),
|
|
f: common_vendor.p({
|
|
label: "选择部件",
|
|
required: true,
|
|
name: "componentType",
|
|
rules: [{
|
|
required: true,
|
|
errorMessage: "请选择部件"
|
|
}]
|
|
}),
|
|
g: baseFormData.value.componentType == "262711452730000"
|
|
}, baseFormData.value.componentType == "262711452730000" ? common_vendor.e({
|
|
h: !readOnly.value
|
|
}, !readOnly.value ? {
|
|
i: common_vendor.o(onBatteryScanClick),
|
|
j: common_vendor.p({
|
|
type: "scan",
|
|
size: "20"
|
|
})
|
|
} : {}, {
|
|
k: common_vendor.f(listBatteryData.value, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.batteryCode),
|
|
b: index,
|
|
c: common_vendor.o(($event) => onBatteryListClick($event, index), index),
|
|
d: "105d8220-9-" + i0 + ",105d8220-8"
|
|
};
|
|
}),
|
|
l: common_vendor.p({
|
|
["right-options"]: listBatteryOptions,
|
|
disabled: readOnly.value
|
|
}),
|
|
m: common_vendor.p({
|
|
title: "出库电池列表",
|
|
type: "line"
|
|
})
|
|
}) : {}, {
|
|
n: baseFormData.value.componentType == "262711452730001"
|
|
}, baseFormData.value.componentType == "262711452730001" ? common_vendor.e({
|
|
o: !readOnly.value
|
|
}, !readOnly.value ? {
|
|
p: common_vendor.o(onHelmetScanClick),
|
|
q: common_vendor.p({
|
|
type: "scan",
|
|
size: "20"
|
|
})
|
|
} : {}, {
|
|
r: common_vendor.f(listHelmetData.value, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.helmetCode),
|
|
b: index,
|
|
c: common_vendor.o(($event) => onHelmetListClick($event, index), index),
|
|
d: "105d8220-13-" + i0 + ",105d8220-12"
|
|
};
|
|
}),
|
|
s: common_vendor.p({
|
|
["right-options"]: listHelmetOptions,
|
|
disabled: readOnly.value
|
|
}),
|
|
t: common_vendor.p({
|
|
title: "出库头盔列表",
|
|
type: "line"
|
|
})
|
|
}) : {}, {
|
|
v: common_vendor.o(($event) => baseFormData.value.outQuantity = $event),
|
|
w: common_vendor.p({
|
|
placeholder: "请输入出库数量",
|
|
disabled: readOnly.value,
|
|
modelValue: baseFormData.value.outQuantity
|
|
}),
|
|
x: common_vendor.p({
|
|
label: "出库数量",
|
|
required: true,
|
|
name: "outQuantity",
|
|
rules: [{
|
|
required: true,
|
|
errorMessage: "请输入出库数量"
|
|
}]
|
|
}),
|
|
y: baseFormData.value.componentType == "262711452730000"
|
|
}, baseFormData.value.componentType == "262711452730000" ? common_vendor.e({
|
|
z: !readOnly1.value
|
|
}, !readOnly1.value ? {
|
|
A: common_vendor.o(onInBatteryScanClick),
|
|
B: common_vendor.p({
|
|
type: "scan",
|
|
size: "20"
|
|
})
|
|
} : {}, {
|
|
C: common_vendor.f(listInBatteryData.value, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.batteryCode),
|
|
b: index,
|
|
c: common_vendor.o(($event) => onInBatteryListClick($event, index), index),
|
|
d: "105d8220-19-" + i0 + ",105d8220-18"
|
|
};
|
|
}),
|
|
D: common_vendor.p({
|
|
["right-options"]: listInBatteryOptions.value,
|
|
disabled: readOnly1.value
|
|
}),
|
|
E: common_vendor.p({
|
|
title: "归还电池列表",
|
|
type: "line"
|
|
})
|
|
}) : {}, {
|
|
F: baseFormData.value.componentType == "262711452730001"
|
|
}, baseFormData.value.componentType == "262711452730001" ? common_vendor.e({
|
|
G: !readOnly1.value
|
|
}, !readOnly1.value ? {
|
|
H: common_vendor.o(onInHelmetScanClick),
|
|
I: common_vendor.p({
|
|
type: "scan",
|
|
size: "20"
|
|
})
|
|
} : {}, {
|
|
J: common_vendor.f(listInHelmetData.value, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.helmetCode),
|
|
b: index,
|
|
c: common_vendor.o(($event) => onInHelmetListClick($event, index), index),
|
|
d: "105d8220-23-" + i0 + ",105d8220-22"
|
|
};
|
|
}),
|
|
K: common_vendor.p({
|
|
["right-options"]: listInHelmetOptions.value,
|
|
disabled: readOnly1.value
|
|
}),
|
|
L: common_vendor.p({
|
|
title: "归还头盔列表",
|
|
type: "line"
|
|
})
|
|
}) : {}, {
|
|
M: baseFormData.value.componentType == "262711452730000" || baseFormData.value.componentType == "262711452730001"
|
|
}, baseFormData.value.componentType == "262711452730000" || baseFormData.value.componentType == "262711452730001" ? {
|
|
N: common_vendor.o(($event) => baseFormData.value.enterQuantity = $event),
|
|
O: common_vendor.p({
|
|
placeholder: "请输入归还数量",
|
|
disabled: readOnly1.value,
|
|
modelValue: baseFormData.value.enterQuantity
|
|
}),
|
|
P: common_vendor.p({
|
|
label: "归还数量",
|
|
name: "enterQuantity"
|
|
})
|
|
} : {}, {
|
|
Q: common_vendor.o(componentHandleOptionChange),
|
|
R: common_vendor.o(($event) => baseFormData.value.oldComponentHandleOption = $event),
|
|
S: common_vendor.p({
|
|
localdata: componentHandleOptionRange,
|
|
placeholder: "请选择原部件处理方案",
|
|
disabled: readOnly1.value,
|
|
modelValue: baseFormData.value.oldComponentHandleOption
|
|
}),
|
|
T: common_vendor.p({
|
|
label: "原部件处理方案",
|
|
required: true,
|
|
name: "oldComponentHandleOption"
|
|
}),
|
|
U: common_vendor.sr(baseForm, "105d8220-1,105d8220-0", {
|
|
"k": "baseForm"
|
|
}),
|
|
V: common_vendor.p({
|
|
modelValue: baseFormData.value,
|
|
labelWidth: "100px"
|
|
}),
|
|
W: common_vendor.p({
|
|
title: "部件出库",
|
|
type: "line"
|
|
}),
|
|
X: baseFormData.value.state == "0" || baseFormData.value.state == "1" && (baseFormData.value.componentType == "262711452730000" || baseFormData.value.componentType == "262711452730001")
|
|
}, baseFormData.value.state == "0" || baseFormData.value.state == "1" && (baseFormData.value.componentType == "262711452730000" || baseFormData.value.componentType == "262711452730001") ? {
|
|
Y: common_vendor.o(navOptionsClick),
|
|
Z: common_vendor.o(navButtonClick),
|
|
aa: common_vendor.p({
|
|
fill: true,
|
|
options: common_vendor.unref(navOptions),
|
|
buttonGroup: common_vendor.unref(navButtonGroup)
|
|
})
|
|
} : {});
|
|
};
|
|
}
|
|
};
|
|
wx.createPage(_sfc_main);
|
|
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/warehouse/component/outdetails.js.map
|