|
@@ -2,20 +2,31 @@
|
|
import { ref, onMounted } from 'vue'
|
|
import { ref, onMounted } from 'vue'
|
|
import { GlobalStore } from '@/stores/index'
|
|
import { GlobalStore } from '@/stores/index'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
+import Drawer from '@/components/Drawer/index.vue'
|
|
import { Storehouse_StockOut_Get } from '@/api/storehouse/index'
|
|
import { Storehouse_StockOut_Get } from '@/api/storehouse/index'
|
|
|
|
|
|
interface InfoType {
|
|
interface InfoType {
|
|
Id: number
|
|
Id: number
|
|
|
|
+ T_type: number
|
|
T_depot_name: string
|
|
T_depot_name: string
|
|
T_date: string
|
|
T_date: string
|
|
T_number: string
|
|
T_number: string
|
|
T_remark: string
|
|
T_remark: string
|
|
T_submit: string
|
|
T_submit: string
|
|
|
|
+ T_signer?: string
|
|
|
|
+ T_signer_phone?: string
|
|
|
|
+ T_signer_date?: string
|
|
|
|
+ T_signer_unit?: string
|
|
T_submit_name: string
|
|
T_submit_name: string
|
|
|
|
+ T_receive_name: string
|
|
|
|
+ T_delivery_type?: string
|
|
|
|
+ T_courier_number?: number
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const tableSnData = ref<any[]>([])
|
|
const info = ref<InfoType | undefined>()
|
|
const info = ref<InfoType | undefined>()
|
|
const globalStore = GlobalStore()
|
|
const globalStore = GlobalStore()
|
|
|
|
+const drawerSnRef = ref<InstanceType<typeof Drawer> | null>(null)
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
|
|
|
@@ -30,6 +41,12 @@ const columns = [
|
|
{ label: '数量', prop: 'T_num', align: 'center ' },
|
|
{ label: '数量', prop: 'T_num', align: 'center ' },
|
|
{ prop: 'operation', label: '关联设备', width: 100, fixed: 'right', align: 'center ' }
|
|
{ prop: 'operation', label: '关联设备', width: 100, fixed: 'right', align: 'center ' }
|
|
]
|
|
]
|
|
|
|
+
|
|
|
|
+const snColumns = [
|
|
|
|
+ { type: 'index', label: '序号', width: 80, align: 'center ' },
|
|
|
|
+ { label: 'SN', prop: 'sn', align: 'center ' }
|
|
|
|
+]
|
|
|
|
+
|
|
const getStorehouseContractGet = async () => {
|
|
const getStorehouseContractGet = async () => {
|
|
const res: any = await Storehouse_StockOut_Get({
|
|
const res: any = await Storehouse_StockOut_Get({
|
|
User_tokey: globalStore.GET_User_tokey,
|
|
User_tokey: globalStore.GET_User_tokey,
|
|
@@ -43,6 +60,27 @@ const getStorehouseContractGet = async () => {
|
|
|
|
|
|
const tableData = ref<any[]>([])
|
|
const tableData = ref<any[]>([])
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 回调
|
|
|
|
+ */
|
|
|
|
+const callbackSnDrawer = (done: () => void) => done()
|
|
|
|
+
|
|
|
|
+const previewSn = (devicelist: string[]) => {
|
|
|
|
+ drawerSnRef.value?.openDrawer()
|
|
|
|
+ if (!devicelist) return
|
|
|
|
+ tableSnData.value = devicelist.map((item: string) => {
|
|
|
|
+ return {
|
|
|
|
+ sn: item
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const delivery_type = {
|
|
|
|
+ 1: '自送',
|
|
|
|
+ 2: '自提',
|
|
|
|
+ 3: '快递'
|
|
|
|
+}
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getStorehouseContractGet()
|
|
getStorehouseContractGet()
|
|
})
|
|
})
|
|
@@ -60,18 +98,6 @@ onMounted(() => {
|
|
>
|
|
>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>入库仓库:</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
- ><span>{{ info?.T_depot_name! }}</span></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>入库日期:</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
- ><span>{{ info?.T_date! }}</span></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
<el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>入库明细:</span></el-col>
|
|
<el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>入库明细:</span></el-col>
|
|
<el-col :span="21">
|
|
<el-col :span="21">
|
|
<el-table
|
|
<el-table
|
|
@@ -97,6 +123,7 @@ onMounted(() => {
|
|
style="height: 50px"
|
|
style="height: 50px"
|
|
:src="row.T_product_img"
|
|
:src="row.T_product_img"
|
|
:preview-src-list="[row.T_product_img]"
|
|
:preview-src-list="[row.T_product_img]"
|
|
|
|
+ :preview-teleported="true"
|
|
fit="cover"
|
|
fit="cover"
|
|
/>
|
|
/>
|
|
<el-tooltip
|
|
<el-tooltip
|
|
@@ -111,7 +138,12 @@ onMounted(() => {
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column v-bind="item" v-if="item.fixed === 'right'">
|
|
<el-table-column v-bind="item" v-if="item.fixed === 'right'">
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
- <el-button type="primary" :disabled="!row.T_product_relation_sn">查看</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="!row.T_product_relation_sn"
|
|
|
|
+ @click="previewSn(row.T_device_list)"
|
|
|
|
+ >查看</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</template>
|
|
</template>
|
|
@@ -119,6 +151,62 @@ onMounted(() => {
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>入库仓库:</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
+ ><span>{{ info?.T_depot_name! }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>入库日期:</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
+ ><span>{{ info?.T_date! }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>领取人:</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
+ ><span>{{ info?.T_date! }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <div v-if="info?.T_type === 2">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>送货方式:</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
+ ><span>{{ info.T_delivery_type ? delivery_type[info.T_delivery_type as string] : '无' }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>签收单位:</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
+ ><span>{{ info.T_signer_unit ? info.T_signer_unit : '无' }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>签收人:</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
+ ><span>{{ info.T_signer ? info.T_signer : '无' }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>签收人联系电话:</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
+ ><span>{{ info.T_signer_phone ? info.T_signer_phone : '无' }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>签收日期:</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
+ ><span>{{ info.T_signer_date ? info.T_signer_date : '无' }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>物流单号:</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
+ ><span>{{ info.T_courier_number ? info.T_courier_number : '无' }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+ <el-row>
|
|
<el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>备注:</span></el-col>
|
|
<el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>备注:</span></el-col>
|
|
<el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
<el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
><span>{{ info?.T_remark! }}</span></el-col
|
|
><span>{{ info?.T_remark! }}</span></el-col
|
|
@@ -130,6 +218,21 @@ onMounted(() => {
|
|
<el-button type="primary" round @click="router.back()">返回</el-button>
|
|
<el-button type="primary" round @click="router.back()">返回</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <Drawer ref="drawerSnRef" :handleClose="callbackSnDrawer" size="30%">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="tableSnData"
|
|
|
|
+ style="width: 100%; height: 99%"
|
|
|
|
+ :header-cell-style="{
|
|
|
|
+ background: '#dedfe0',
|
|
|
|
+ height: '50px'
|
|
|
|
+ }"
|
|
|
|
+ >
|
|
|
|
+ <template v-for="item in snColumns" :key="item">
|
|
|
|
+ <el-table-column v-if="item.type === 'index'" v-bind="item" />
|
|
|
|
+ <el-table-column v-if="item.prop" v-bind="item" />
|
|
|
|
+ </template>
|
|
|
|
+ </el-table>
|
|
|
|
+ </Drawer>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|