Compare commits
No commits in common. "7facb0adc2f1e9fe02c3ae05ab348227d6cd2ca2" and "4d56874d26566628b33d72d1b820e0bb7147b0fe" have entirely different histories.
7facb0adc2
...
4d56874d26
|
|
@ -25,10 +25,9 @@ const handleSelect = (item: any) => {
|
||||||
unitPrice: goods.unitPrice,
|
unitPrice: goods.unitPrice,
|
||||||
packagingUnit: goods.packagingUnit,
|
packagingUnit: goods.packagingUnit,
|
||||||
minPackagingUnit: goods.minPackagingUnit,
|
minPackagingUnit: goods.minPackagingUnit,
|
||||||
idCode: (goods.idCode&&goods.idCode != "")?goods.idCode.split(","):[],
|
|
||||||
goodId: goods.id,
|
goodId: goods.id,
|
||||||
name: goods.name,
|
name: goods.name,
|
||||||
traceabilityCodeList:[],
|
|
||||||
wholeNumber: 0,
|
wholeNumber: 0,
|
||||||
purchaseUnitPrice: goods.purchaseUnitPrice,
|
purchaseUnitPrice: goods.purchaseUnitPrice,
|
||||||
disassemblyPrice : goods.disassemblyPrice
|
disassemblyPrice : goods.disassemblyPrice
|
||||||
|
|
|
||||||
|
|
@ -133,19 +133,8 @@
|
||||||
size="small" style="width: 100px;"/>
|
size="small" style="width: 100px;"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品追溯码" width="150">
|
<el-table-column label="操作" width="100">
|
||||||
<template #default="scope">
|
<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>
|
<el-button size="small" @click="removeTableRow(scope.row)" type="danger" plain>移除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -168,7 +157,7 @@
|
||||||
<!-- <Mask :is-show="is_add" :top="100">-->
|
<!-- <Mask :is-show="is_add" :top="100">-->
|
||||||
<!-- <Edit ref="editRef" @close="is_add = false;"/>-->
|
<!-- <Edit ref="editRef" @close="is_add = false;"/>-->
|
||||||
<!-- </Mask>-->
|
<!-- </Mask>-->
|
||||||
<CheckoutDetail ref="checkoutDetailRef" @confirm="confirmTrace"></CheckoutDetail>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
@ -178,11 +167,9 @@ import Edit from "@/components/inventory/goods/Edit.vue";
|
||||||
import Mask from "@/components/common/Mask.vue";
|
import Mask from "@/components/common/Mask.vue";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||||
import CheckoutDetail from "@/components/inventory/CheckoutDetail.vue";
|
|
||||||
import {Search} from "@element-plus/icons-vue";
|
import {Search} from "@element-plus/icons-vue";
|
||||||
|
|
||||||
const orderForm = ref()
|
const orderForm = ref()
|
||||||
const checkoutDetailRef = ref<any>(false);
|
|
||||||
const formRules = ref({
|
const formRules = ref({
|
||||||
shippingCode: [{required: true, message: '请输入货单号', trigger: 'blur'}],
|
shippingCode: [{required: true, message: '请输入货单号', trigger: 'blur'}],
|
||||||
purchaseDate: [{required: true, message: '请选择采购日期', trigger: 'change'}],
|
purchaseDate: [{required: true, message: '请选择采购日期', trigger: 'change'}],
|
||||||
|
|
@ -277,7 +264,6 @@ function getFormattedDate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
let confirm = async () => {
|
let confirm = async () => {
|
||||||
console.log('table_list.value++++++++++++++',table_list.value)
|
|
||||||
// 进行表单验证
|
// 进行表单验证
|
||||||
try {
|
try {
|
||||||
await orderForm.value.validate()
|
await orderForm.value.validate()
|
||||||
|
|
@ -373,26 +359,6 @@ const init = () => {
|
||||||
getSupplierList()
|
getSupplierList()
|
||||||
getUserInfo()
|
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})
|
defineExpose({init})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue