完成
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
<span>{{ parseTime(scope.row.borrowTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="理货员" align="center" prop="operator" />
|
||||
<el-table-column label="理货员" align="center" prop="operatorName" />
|
||||
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
@@ -208,18 +208,12 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- //还料弹框 -->
|
||||
<!-- 还料弹框 -->
|
||||
<el-dialog title="还料" v-model="returnOpen" append-to-body width="40%">
|
||||
<el-form ref="returnRef" :model="returnData" label-width="100px">
|
||||
<el-form-item label="所属仓库" prop="warehouseCode">
|
||||
<el-cascader :options="warehouseData" style="width: 100%;" v-model="returnData.warehouseCode"
|
||||
@change="pcodeList" :props="{ children: 'children', label: 'warehouseName', value: 'warehouseCode' }"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位">
|
||||
<el-select v-model="returnData.pcode" clearable :filterable="true" placeholder="请选择库位">
|
||||
<el-option v-for="item in kwOptions" :key="item.id" :label="item.pcode" :value="item.pcode" />
|
||||
</el-select>
|
||||
<el-form-item label="还料时间">
|
||||
<el-date-picker style="width: 100%" v-model="returnData.returnTime" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm:ss" type="datetime" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
@@ -233,7 +227,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="outbound">
|
||||
import { returnSubmit ,listStockByXm} from "@/api/wisdom/borrow"; //列表
|
||||
import { returnBill ,listStockByXm} from "@/api/wisdom/borrow"; //列表
|
||||
import { warehouseAll } from "@/api/information/warehouseinfo";
|
||||
import { listOuttype } from "@/api/information/outtype"; //出库类型
|
||||
import { listConstruction } from "@/api/information/construction"; //施工队
|
||||
@@ -248,7 +242,7 @@ const { proxy } = getCurrentInstance();
|
||||
|
||||
const outboundList = ref([]);
|
||||
const open = ref(false);
|
||||
const returnOpen = ref(false)
|
||||
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
@@ -273,11 +267,6 @@ const data = reactive({
|
||||
storeData: {
|
||||
ckType: "JLCK"
|
||||
}, //借料数据
|
||||
returnData: {
|
||||
originalId: null,
|
||||
pcode: "",
|
||||
rkType: "RK029" //入库类型:借料归还入库
|
||||
}, //还料数据
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -319,7 +308,7 @@ const data = reactive({
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, storeData, rules, form, printViewInfo, outQueryParams, returnData } = toRefs(data);
|
||||
const { queryParams, storeData, rules, form, printViewInfo, outQueryParams } = toRefs(data);
|
||||
|
||||
const statusList = ref([
|
||||
{ value: 1, label: '未还料', elTagType: "danger", elTagClass: null },
|
||||
@@ -342,6 +331,7 @@ function getList() {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
getList();
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
@@ -485,29 +475,39 @@ function submitForm() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const returnId = ref([])
|
||||
const returnData = ref({})
|
||||
const returnOpen = ref(false)
|
||||
//打开还料弹框
|
||||
function handleReturn(row) {
|
||||
returnData.value.pcode = row.pcode
|
||||
returnData.value.warehouseCode = [row.parentWarehouseCode, row.warehouseCode]
|
||||
returnData.value.originalId = row.id
|
||||
console.log(returnData.value)
|
||||
returnId.value[0] = row.id
|
||||
returnData.value.returnTime = ''
|
||||
returnOpen.value = true
|
||||
}
|
||||
//取消还料弹框
|
||||
function cancelReturn() {
|
||||
returnOpen.value = false
|
||||
}
|
||||
//还料保存
|
||||
function returnForm() {
|
||||
let obj = JSON.parse(JSON.stringify(returnData.value))
|
||||
obj.warehouseCode = returnData.value.warehouseCode[1]
|
||||
returnSubmit(obj).then(response => {
|
||||
if (!returnData.value.returnTime) {
|
||||
proxy.$modal.msgError("请选择还料时间");
|
||||
return
|
||||
}
|
||||
let ids = JSON.parse(JSON.stringify(returnId.value))
|
||||
let items = ids.map(item => {
|
||||
return {
|
||||
recordId: item,
|
||||
returnTime: returnData.value.returnTime
|
||||
}
|
||||
});
|
||||
returnBill({items}).then(response => {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
returnOpen.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
// //库位字典
|
||||
//取消还料弹框
|
||||
function cancelReturn() {
|
||||
returnOpen.value = false
|
||||
}
|
||||
|
||||
|
||||
/** 导出按钮操作 */
|
||||
@@ -534,7 +534,7 @@ function pcodeList(value) {
|
||||
})
|
||||
}
|
||||
|
||||
getList();
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user