Compare commits

..

No commits in common. "23e276a9084c7d74e69ebb7224a7a6b3788cd5c6" and "346e3c6e965ccd089c3789dbe0163c4e5e6023a4" have entirely different histories.

3 changed files with 8 additions and 76 deletions

View File

@ -146,12 +146,11 @@
</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>
@ -194,7 +193,6 @@ 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);
@ -323,10 +321,6 @@ 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))
@ -338,7 +332,6 @@ let confirm = async () => {
}) })
} catch (error) { } catch (error) {
console.log(error)
ElMessage.warning('请填写完整必填项') ElMessage.warning('请填写完整必填项')
} finally { } finally {
isLoading.value = false isLoading.value = false

View File

@ -1,58 +0,0 @@
<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) }}&nbsp;{{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>

View File

@ -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 == 0" type="success">{{ reconciliationResult[0] }}</el-tag> <el-tag v-if="scope.row.reconciliationResult == 1" type="success">{{ reconciliationResult[1] }}</el-tag>
<el-tag v-if="scope.row.reconciliationResult != null&&scope.row.reconciliationResult != 0" type="danger">{{ <el-tag v-if="scope.row.reconciliationResult != null&&scope.row.reconciliationResult != 1" type="danger">{{
reconciliationResult[scope.row.reconciliationResult as keyof typeof reconciliationResult] || '未知状态' reconciliationResult[scope.row.reconciliationResult as keyof typeof reconciliationResult] || '未知状态'
}} }}
</el-tag> </el-tag>
@ -80,10 +80,7 @@ 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({ ElMessage.success(res.stmtinfo.stmt_rslt_dscr);
message: res.stmtinfo.stmt_rslt_dscr,
duration: 8000
});
row.reconciliationResult = res.stmtinfo.stmt_rslt row.reconciliationResult = res.stmtinfo.stmt_rslt
}) })
} }