Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
This commit is contained in:
commit
035e715bda
|
|
@ -25,9 +25,10 @@ const handleSelect = (item: any) => {
|
|||
unitPrice: goods.unitPrice,
|
||||
packagingUnit: goods.packagingUnit,
|
||||
minPackagingUnit: goods.minPackagingUnit,
|
||||
|
||||
idCode: (goods.idCode&&goods.idCode != "")?goods.idCode.split(","):[],
|
||||
goodId: goods.id,
|
||||
name: goods.name,
|
||||
traceabilityCodeList:[],
|
||||
wholeNumber: 0,
|
||||
purchaseUnitPrice: goods.purchaseUnitPrice,
|
||||
disassemblyPrice : goods.disassemblyPrice
|
||||
|
|
|
|||
|
|
@ -133,8 +133,19 @@
|
|||
size="small" style="width: 100px;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<el-table-column label="商品追溯码" width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.traceabilityCode"
|
||||
placeholder="商品追溯码"
|
||||
style="width: 100px"
|
||||
size="small"/>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button size="small" @click="openCheckoutDetail(scope.row)" type="danger" plain>溯源码</el-button>
|
||||
<el-button size="small" @click="removeTableRow(scope.row)" type="danger" plain>移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -157,7 +168,7 @@
|
|||
<!-- <Mask :is-show="is_add" :top="100">-->
|
||||
<!-- <Edit ref="editRef" @close="is_add = false;"/>-->
|
||||
<!-- </Mask>-->
|
||||
|
||||
<CheckoutDetail ref="checkoutDetailRef" @confirm="confirmTrace"></CheckoutDetail>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
@ -167,9 +178,11 @@ import Edit from "@/components/inventory/goods/Edit.vue";
|
|||
import Mask from "@/components/common/Mask.vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||
import CheckoutDetail from "@/components/inventory/CheckoutDetail.vue";
|
||||
import {Search} from "@element-plus/icons-vue";
|
||||
|
||||
const orderForm = ref()
|
||||
const checkoutDetailRef = ref<any>(false);
|
||||
const formRules = ref({
|
||||
shippingCode: [{required: true, message: '请输入货单号', trigger: 'blur'}],
|
||||
purchaseDate: [{required: true, message: '请选择采购日期', trigger: 'change'}],
|
||||
|
|
@ -264,6 +277,7 @@ function getFormattedDate() {
|
|||
}
|
||||
|
||||
let confirm = async () => {
|
||||
console.log('table_list.value++++++++++++++',table_list.value)
|
||||
// 进行表单验证
|
||||
try {
|
||||
await orderForm.value.validate()
|
||||
|
|
@ -359,6 +373,26 @@ const init = () => {
|
|||
getSupplierList()
|
||||
getUserInfo()
|
||||
}
|
||||
// 追溯码代码
|
||||
const openCheckoutDetail = (row: any) => {
|
||||
let goodlist = []
|
||||
goodlist.push(row)
|
||||
nextTick(() => {
|
||||
checkoutDetailRef.value.init(goodlist);
|
||||
})
|
||||
}
|
||||
//追溯码页面回调
|
||||
const confirmTrace = (data: any) => {
|
||||
let index = findIndexForTableList(data[0].goodId);
|
||||
table_list.value[index] = data[0]
|
||||
checkoutDetailRef.value.close();
|
||||
// table_list.value.forEach((item: any) => {
|
||||
// if(item.goodId === data[0].goodId){
|
||||
// item = data[0]
|
||||
// table_list.value.
|
||||
// }
|
||||
// })
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
Loading…
Reference in New Issue