Compare commits
2 Commits
346e3c6e96
...
23e276a908
| Author | SHA1 | Date |
|---|---|---|
|
|
23e276a908 | |
|
|
b849738d4e |
|
|
@ -146,11 +146,12 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品追溯码" width="150">
|
<el-table-column label="商品追溯码" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="scope.row.traceabilityCode"
|
<!-- v-model="scope.row.traceabilityCode"-->
|
||||||
placeholder="商品追溯码"
|
<!-- placeholder="商品追溯码"-->
|
||||||
style="width: 100px"
|
<!-- style="width: 100px"-->
|
||||||
size="small"/>
|
<!-- size="small"/>-->
|
||||||
|
<TraceabilityCodeInput v-model="scope.row.traceabilityCodeList"></TraceabilityCodeInput>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -193,6 +194,7 @@ import AddSupplier from "@/components/inventory/supplier/AddSupplier.vue";
|
||||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||||
import CheckoutDetail from "@/components/inventory/CheckoutDetail.vue";
|
import CheckoutDetail from "@/components/inventory/CheckoutDetail.vue";
|
||||||
import {Search} from "@element-plus/icons-vue";
|
import {Search} from "@element-plus/icons-vue";
|
||||||
|
import TraceabilityCodeInput from "@/components/inventory/purchase/TraceabilityCodeInput.vue";
|
||||||
|
|
||||||
const orderForm = ref()
|
const orderForm = ref()
|
||||||
const checkoutDetailRef = ref<any>(false);
|
const checkoutDetailRef = ref<any>(false);
|
||||||
|
|
@ -321,6 +323,10 @@ let confirm = async () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
table_list.value.forEach((item: any) => {
|
||||||
|
console.log(item.traceabilityCodeList)
|
||||||
|
item.traceabilityCode= JSON.stringify(item.traceabilityCodeList)
|
||||||
|
})
|
||||||
let data = {
|
let data = {
|
||||||
inventoryOrder: JSON.parse(JSON.stringify(inventory_order_data.value)),
|
inventoryOrder: JSON.parse(JSON.stringify(inventory_order_data.value)),
|
||||||
inventoryOrderGoodsList: JSON.parse(JSON.stringify(table_list.value))
|
inventoryOrderGoodsList: JSON.parse(JSON.stringify(table_list.value))
|
||||||
|
|
@ -332,6 +338,7 @@ let confirm = async () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
ElMessage.warning('请填写完整必填项')
|
ElMessage.warning('请填写完整必填项')
|
||||||
} finally {
|
} finally {
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
<template>
|
||||||
|
<el-popover placement="bottom-start" :visible="isVisible" width="400">
|
||||||
|
<template #reference>
|
||||||
|
<el-input v-model="input" style="width:100%;height: 100%" placeholder="追溯码" size="small" @focus="focus"
|
||||||
|
@blur="handlerBlur" @keydown.enter="addCode"></el-input>
|
||||||
|
</template>
|
||||||
|
<div class="code-popo">
|
||||||
|
<el-table :data="list">
|
||||||
|
<el-table-column label="追溯码" prop="code">
|
||||||
|
<template #default="{row}">
|
||||||
|
{{ row.code.slice(0, 7) }} {{row.code.slice(7)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="num"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {ref, watch, onMounted, onUnmounted, nextTick} from "vue";
|
||||||
|
|
||||||
|
interface listType {
|
||||||
|
code: string;
|
||||||
|
num: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
const list = defineModel<listType[]>();
|
||||||
|
const input = ref("");
|
||||||
|
const isVisible = ref(false);
|
||||||
|
const focus = () => {
|
||||||
|
isVisible.value = true;
|
||||||
|
};
|
||||||
|
const handlerBlur = () => {
|
||||||
|
isVisible.value = false;
|
||||||
|
}
|
||||||
|
const addCode = () => {
|
||||||
|
if (!list.value) {
|
||||||
|
list.value = []
|
||||||
|
}
|
||||||
|
let index = list.value?.findIndex((item: any) => item.code === input.value);
|
||||||
|
if (index !== -1) {
|
||||||
|
list.value[index].num++;
|
||||||
|
} else {
|
||||||
|
list.value?.push({
|
||||||
|
code: input.value,
|
||||||
|
num: 1,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
clearInput()
|
||||||
|
};
|
||||||
|
|
||||||
|
const clearInput = () => {
|
||||||
|
input.value = "";
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -22,8 +22,8 @@
|
||||||
<el-table-column label="对账结果" prop="reconciliationResult">
|
<el-table-column label="对账结果" prop="reconciliationResult">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.reconciliationResult == null" type="info">未对账</el-tag>
|
<el-tag v-if="scope.row.reconciliationResult == null" type="info">未对账</el-tag>
|
||||||
<el-tag v-if="scope.row.reconciliationResult == 1" type="success">{{ reconciliationResult[1] }}</el-tag>
|
<el-tag v-if="scope.row.reconciliationResult == 0" type="success">{{ reconciliationResult[0] }}</el-tag>
|
||||||
<el-tag v-if="scope.row.reconciliationResult != null&&scope.row.reconciliationResult != 1" type="danger">{{
|
<el-tag v-if="scope.row.reconciliationResult != null&&scope.row.reconciliationResult != 0" type="danger">{{
|
||||||
reconciliationResult[scope.row.reconciliationResult as keyof typeof reconciliationResult] || '未知状态'
|
reconciliationResult[scope.row.reconciliationResult as keyof typeof reconciliationResult] || '未知状态'
|
||||||
}}
|
}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
|
@ -80,7 +80,10 @@ const accountRecordDo = (row: any) => {
|
||||||
data.beginTime = selectDate.value[0];
|
data.beginTime = selectDate.value[0];
|
||||||
data.endTime = selectDate.value[1];
|
data.endTime = selectDate.value[1];
|
||||||
post("social/reconciliation/totalDo", {data: data}).then((res: any) => {
|
post("social/reconciliation/totalDo", {data: data}).then((res: any) => {
|
||||||
ElMessage.success(res.stmtinfo.stmt_rslt_dscr);
|
ElMessage.success({
|
||||||
|
message: res.stmtinfo.stmt_rslt_dscr,
|
||||||
|
duration: 8000
|
||||||
|
});
|
||||||
row.reconciliationResult = res.stmtinfo.stmt_rslt
|
row.reconciliationResult = res.stmtinfo.stmt_rslt
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue