|
@@ -47,13 +47,14 @@
|
|
v-model="dialog3.visible"
|
|
v-model="dialog3.visible"
|
|
:title="dialog3.title"
|
|
:title="dialog3.title"
|
|
width="1100px"
|
|
width="1100px"
|
|
|
|
+ :destroy-on-close="true"
|
|
@close="dialog3.visible = false"
|
|
@close="dialog3.visible = false"
|
|
>
|
|
>
|
|
<el-form ref="ruleFormRef" label-width="90px" :rules="rules">
|
|
<el-form ref="ruleFormRef" label-width="90px" :rules="rules">
|
|
<el-row :gutter="22" style="margin-top: 5px">
|
|
<el-row :gutter="22" style="margin-top: 5px">
|
|
<el-col :span="11">
|
|
<el-col :span="11">
|
|
<el-form-item label="类型" prop="type">
|
|
<el-form-item label="类型" prop="type">
|
|
- <el-select v-model="form.type" placeholder="请选择">
|
|
|
|
|
|
+ <el-select v-model="form.type" placeholder="请选择" @change="changeShow">
|
|
<el-option
|
|
<el-option
|
|
v-for="option in fieldOptions"
|
|
v-for="option in fieldOptions"
|
|
:key="option.value"
|
|
:key="option.value"
|
|
@@ -64,23 +65,35 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="11">
|
|
<el-col :span="11">
|
|
- <el-form-item label="载具编号" prop="vehicleCode">
|
|
|
|
|
|
+ <el-form-item label="单据编号" prop="orderNo">
|
|
<el-input
|
|
<el-input
|
|
- v-model="form.vehicleCode"
|
|
|
|
- placeholder="请输入载具编号"
|
|
|
|
|
|
+ v-model="form.orderNo"
|
|
|
|
+ placeholder="请输入单据编号"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row :gutter="22" style="margin-top: 5px">
|
|
|
|
|
|
+ <el-row :gutter="22" style="margin-top: 5px" v-if="isShow">
|
|
<el-col :span="11">
|
|
<el-col :span="11">
|
|
- <el-form-item label="库位坐标" prop="locationNo">
|
|
|
|
|
|
+ <el-form-item label="仓库编号" prop="houseNo">
|
|
<el-input
|
|
<el-input
|
|
- v-model="form.locationNo"
|
|
|
|
- placeholder="请输入库位坐标"
|
|
|
|
|
|
+ v-model="form.houseNo"
|
|
|
|
+ placeholder="仓库编号"
|
|
|
|
+ :readonly="true"
|
|
|
|
+ @click="selectHouse"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+
|
|
|
|
+ <el-col :span="11">
|
|
|
|
+ <el-form-item label="仓库名称" prop="houseName">
|
|
|
|
+ <el-input
|
|
|
|
+ :disabled="true"
|
|
|
|
+ v-model="form.houseName"
|
|
|
|
+ placeholder="仓库名称"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
<!-- <el-col :span="11">
|
|
<!-- <el-col :span="11">
|
|
<el-form-item label="载具编号">
|
|
<el-form-item label="载具编号">
|
|
<el-input
|
|
<el-input
|
|
@@ -90,6 +103,39 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>-->
|
|
</el-col>-->
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ <el-row :gutter="22" style="margin-top: 5px" v-if="isShow">
|
|
|
|
+ <el-col :span="11">
|
|
|
|
+ <el-form-item label="货位" prop="coordinate">
|
|
|
|
+ <el-input
|
|
|
|
+ :disabled="true"
|
|
|
|
+ v-model="form.coordinate"
|
|
|
|
+ placeholder="货位"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ <el-col :span="11">
|
|
|
|
+ <el-form-item label="层数" prop="position">
|
|
|
|
+ <el-input
|
|
|
|
+ :disabled="true"
|
|
|
|
+ v-model="form.position"
|
|
|
|
+ placeholder="层数"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ <el-row :gutter="22" style="margin-top: 5px">
|
|
|
|
+ <el-col :span="11">
|
|
|
|
+ <el-form-item label="载具编号">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="form.vehicleCode"
|
|
|
|
+ placeholder="请输入载具编号"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
<el-divider />
|
|
<el-divider />
|
|
<el-text class="mx-1" size="large">物料详情</el-text>
|
|
<el-text class="mx-1" size="large">物料详情</el-text>
|
|
<el-button
|
|
<el-button
|
|
@@ -117,7 +163,7 @@
|
|
v-model="item.materialNo"
|
|
v-model="item.materialNo"
|
|
placeholder="请选择物料编号"
|
|
placeholder="请选择物料编号"
|
|
readonly
|
|
readonly
|
|
- :onclick="choiceItem(item)"
|
|
|
|
|
|
+ @click="choiceItem(item,index)"
|
|
/>
|
|
/>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="3"
|
|
<el-col :span="3"
|
|
@@ -130,7 +176,7 @@
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
<el-input v-model="item.spec" placeholder="物料型号" readonly />
|
|
<el-input v-model="item.spec" placeholder="物料型号" readonly />
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="2">
|
|
|
|
|
|
+<!-- <el-col :span="2">
|
|
<el-select v-model="item.materialType" placeholder="请选择物料类别">
|
|
<el-select v-model="item.materialType" placeholder="请选择物料类别">
|
|
<el-option
|
|
<el-option
|
|
v-for="option in stock_material_type_list"
|
|
v-for="option in stock_material_type_list"
|
|
@@ -139,7 +185,7 @@
|
|
:value="option.dictValue"
|
|
:value="option.dictValue"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- </el-col>
|
|
|
|
|
|
+ </el-col>-->
|
|
<el-col :span="2">
|
|
<el-col :span="2">
|
|
<el-input v-model="item.unit" placeholder="单位" readonly />
|
|
<el-input v-model="item.unit" placeholder="单位" readonly />
|
|
</el-col>
|
|
</el-col>
|
|
@@ -150,8 +196,8 @@
|
|
<el-input
|
|
<el-input
|
|
v-model="item.num"
|
|
v-model="item.num"
|
|
placeholder="数量"
|
|
placeholder="数量"
|
|
- min="0"
|
|
|
|
- max="9999"
|
|
|
|
|
|
+ min="1"
|
|
|
|
+ :max="maxList[index]"
|
|
type="number"
|
|
type="number"
|
|
/>
|
|
/>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -170,6 +216,18 @@
|
|
>
|
|
>
|
|
<ChoiceItemPage @material-info="materialInfo" :enabled="-1" />
|
|
<ChoiceItemPage @material-info="materialInfo" :enabled="-1" />
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <CommonTable
|
|
|
|
+ ref="houseRef"
|
|
|
|
+ tableTitle="选择仓库位置"
|
|
|
|
+ tableType="HOUSE_POSITION"
|
|
|
|
+ @selected-sure="onSelectedFinish"
|
|
|
|
+ />
|
|
|
|
+ <CommonTable
|
|
|
|
+ ref="stockRef"
|
|
|
|
+ tableTitle="库存选择"
|
|
|
|
+ tableType="HOUSE_STOCK"
|
|
|
|
+ @selected-sure="onSelected"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
@@ -185,10 +243,25 @@ const test = () => {
|
|
isShowTable.value = true;
|
|
isShowTable.value = true;
|
|
tableType.value = tableType.value == 1 ? 2 : 1;
|
|
tableType.value = tableType.value == 1 ? 2 : 1;
|
|
};
|
|
};
|
|
|
|
+const maxList=ref([]);
|
|
|
|
+const isShow=ref(true);
|
|
|
|
+const houseRef=ref(null);
|
|
|
|
+const selectHouse =()=>{
|
|
|
|
+ houseRef.value.startSelect();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const stockRef=ref(null);
|
|
const showSeqPage = (info) => {
|
|
const showSeqPage = (info) => {
|
|
infoObj.value = info;
|
|
infoObj.value = info;
|
|
dialog4.visible = true;
|
|
dialog4.visible = true;
|
|
};
|
|
};
|
|
|
|
+const changeShow=()=>{
|
|
|
|
+ if(form.value.type==='2'){
|
|
|
|
+ isShow.value=false;
|
|
|
|
+ }else {
|
|
|
|
+ isShow.value=true;
|
|
|
|
+ }
|
|
|
|
+}
|
|
const dialog3 = reactive({
|
|
const dialog3 = reactive({
|
|
title: "新增",
|
|
title: "新增",
|
|
visible: false,
|
|
visible: false,
|
|
@@ -198,10 +271,17 @@ const dialog4 = reactive({
|
|
visible: false,
|
|
visible: false,
|
|
});
|
|
});
|
|
const rules = reactive({
|
|
const rules = reactive({
|
|
- vehicleCode: [{ required: true, message: "请选择载具", trigger: "blur" }],
|
|
|
|
type: [{ required: true, message: "请选择类型", trigger: "blur" }],
|
|
type: [{ required: true, message: "请选择类型", trigger: "blur" }],
|
|
- locationNo: [{ required: true, message: "请输入坐标", trigger: "blur" }],
|
|
|
|
|
|
+ orderNo: [{ required: true, message: "请输入单据编号", trigger: "blur" }]
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+const onSelectedFinish =(val)=>{
|
|
|
|
+ form.value.houseNo=val.houseNo;
|
|
|
|
+ form.value.houseName=val.houseName;
|
|
|
|
+ form.value.coordinate=val.coordinate;
|
|
|
|
+ form.value.position=val.layer;
|
|
|
|
+}
|
|
const materialInfo = (value) => {
|
|
const materialInfo = (value) => {
|
|
clickObj.value.materialNo = value.materialCode;
|
|
clickObj.value.materialNo = value.materialCode;
|
|
clickObj.value.materialName = value.materialName;
|
|
clickObj.value.materialName = value.materialName;
|
|
@@ -209,6 +289,22 @@ const materialInfo = (value) => {
|
|
clickObj.value.unit = value.unitDictValue;
|
|
clickObj.value.unit = value.unitDictValue;
|
|
dialog2.visible = false;
|
|
dialog2.visible = false;
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+const onSelected=(value)=>{
|
|
|
|
+ for(let i=0;i<formDataList.value.length;i++){
|
|
|
|
+ if(value.id===formDataList.value[i].houseStockId){
|
|
|
|
+ ElMessage.error("该库存已经选择过了!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ clickObj.value.materialNo = value.materialNo;
|
|
|
|
+ clickObj.value.materialName = value.materialName;
|
|
|
|
+ clickObj.value.spec = value.spec;
|
|
|
|
+ clickObj.value.unit = value.unit;
|
|
|
|
+ clickObj.value.num = value.num;
|
|
|
|
+ maxList.value[line.value]=value.num;
|
|
|
|
+ clickObj.value.houseStockId =value.id;
|
|
|
|
+}
|
|
const dialog2 = reactive({
|
|
const dialog2 = reactive({
|
|
title: "物料选择",
|
|
title: "物料选择",
|
|
visible: false,
|
|
visible: false,
|
|
@@ -219,17 +315,25 @@ const addVal = () => {
|
|
const addItem = () => {
|
|
const addItem = () => {
|
|
typeIndex.value = 1;
|
|
typeIndex.value = 1;
|
|
formDataList.value.push({});
|
|
formDataList.value.push({});
|
|
|
|
+ maxList.value.push(9999);
|
|
};
|
|
};
|
|
const typeIndex = ref(0);
|
|
const typeIndex = ref(0);
|
|
const minusItem = () => {
|
|
const minusItem = () => {
|
|
typeIndex.value = 0;
|
|
typeIndex.value = 0;
|
|
formDataList.value.splice(formDataList.value.length - 1, 1);
|
|
formDataList.value.splice(formDataList.value.length - 1, 1);
|
|
|
|
+ maxList.value.slice(maxList.value.length-1,1);
|
|
};
|
|
};
|
|
const clickObj = ref(null);
|
|
const clickObj = ref(null);
|
|
-const choiceItem = (item) => {
|
|
|
|
|
|
+const line=ref(0);
|
|
|
|
+const choiceItem = (item,index) => {
|
|
if (typeIndex.value === 1) {
|
|
if (typeIndex.value === 1) {
|
|
- dialog2.visible = true;
|
|
|
|
|
|
+ line.value=index;
|
|
clickObj.value = item;
|
|
clickObj.value = item;
|
|
|
|
+ if(form.value.type==='2'){
|
|
|
|
+ stockRef.value.startSelect();
|
|
|
|
+ }else if(form.value.type){
|
|
|
|
+ dialog2.visible = true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const fieldOptions = ref([
|
|
const fieldOptions = ref([
|
|
@@ -253,6 +357,7 @@ const handleSubmit = () => {
|
|
dataList();
|
|
dataList();
|
|
form.value = null;
|
|
form.value = null;
|
|
formDataList.value = [];
|
|
formDataList.value = [];
|
|
|
|
+ maxList.value=[];
|
|
dialog3.visible = false;
|
|
dialog3.visible = false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -298,10 +403,16 @@ option.value = Object.assign(option.value, {
|
|
],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "载具编号",
|
|
|
|
|
|
+ label: "仓库编号",
|
|
overHidden: true,
|
|
overHidden: true,
|
|
- prop: "vehicleCode",
|
|
|
|
|
|
+ prop: "houseNo",
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ label: "仓库名称",
|
|
|
|
+ overHidden: true,
|
|
|
|
+ prop: "houseName",
|
|
|
|
+ },
|
|
/*{
|
|
/*{
|
|
label: "物料编号",
|
|
label: "物料编号",
|
|
width: 130,
|
|
width: 130,
|
|
@@ -330,8 +441,13 @@ option.value = Object.assign(option.value, {
|
|
{
|
|
{
|
|
label: "库位",
|
|
label: "库位",
|
|
overHidden: true,
|
|
overHidden: true,
|
|
- prop: "locationNo",
|
|
|
|
|
|
+ prop: "coordinate",
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ label: "层数",
|
|
|
|
+ overHidden: true,
|
|
|
|
+ prop: "position",
|
|
|
|
+ },
|
|
/* {
|
|
/* {
|
|
label: "二维码",
|
|
label: "二维码",
|
|
prop: "batchCode",
|
|
prop: "batchCode",
|