Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
# Conflicts: # src/components/inventory/purchase/AddOrder.vue
This commit is contained in:
commit
63f1e1f64e
|
|
@ -148,11 +148,12 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="商品追溯码" width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.traceabilityCode"
|
||||
placeholder="商品追溯码"
|
||||
style="width: 100px"
|
||||
size="small"/>
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="scope.row.traceabilityCode"-->
|
||||
<!-- placeholder="商品追溯码"-->
|
||||
<!-- style="width: 100px"-->
|
||||
<!-- size="small"/>-->
|
||||
<TraceabilityCodeInput v-model="scope.row.traceabilityCodeList"></TraceabilityCodeInput>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
|
@ -194,6 +195,7 @@ import {ElMessage} from "element-plus";
|
|||
import AddSupplier from "@/components/inventory/supplier/AddSupplier.vue";
|
||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||
import CheckoutDetail from "@/components/inventory/CheckoutDetail.vue";
|
||||
import TraceabilityCodeInput from "@/components/inventory/purchase/TraceabilityCodeInput.vue";
|
||||
import {Plus} from "@element-plus/icons-vue";
|
||||
|
||||
const orderForm = ref()
|
||||
|
|
@ -323,6 +325,10 @@ let confirm = async () => {
|
|||
return
|
||||
}
|
||||
}
|
||||
table_list.value.forEach((item: any) => {
|
||||
console.log(item.traceabilityCodeList)
|
||||
item.traceabilityCode= JSON.stringify(item.traceabilityCodeList)
|
||||
})
|
||||
let data = {
|
||||
inventoryOrder: JSON.parse(JSON.stringify(inventory_order_data.value)),
|
||||
inventoryOrderGoodsList: JSON.parse(JSON.stringify(table_list.value))
|
||||
|
|
@ -334,6 +340,7 @@ let confirm = async () => {
|
|||
})
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
ElMessage.warning('请填写完整必填项')
|
||||
} finally {
|
||||
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">
|
||||
<template #default="scope">
|
||||
<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 != null&&scope.row.reconciliationResult != 1" type="danger">{{
|
||||
<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 != 0" type="danger">{{
|
||||
reconciliationResult[scope.row.reconciliationResult as keyof typeof reconciliationResult] || '未知状态'
|
||||
}}
|
||||
</el-tag>
|
||||
|
|
@ -80,7 +80,10 @@ const accountRecordDo = (row: any) => {
|
|||
data.beginTime = selectDate.value[0];
|
||||
data.endTime = selectDate.value[1];
|
||||
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
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue