|
@@ -91,7 +91,7 @@
|
|
</div>
|
|
</div>
|
|
</template> -->
|
|
</template> -->
|
|
|
|
|
|
- <div class="my-8" v-if="wlList.length > 0">
|
|
|
|
|
|
+ <div class="my-8">
|
|
<!-- 搜索表单 -->
|
|
<!-- 搜索表单 -->
|
|
<el-form :model="queryParams" ref="searchFormRef" :inline="true" v-show="showSearch">
|
|
<el-form :model="queryParams" ref="searchFormRef" :inline="true" v-show="showSearch">
|
|
<el-form-item label="物料编码" prop="materialNo">
|
|
<el-form-item label="物料编码" prop="materialNo">
|
|
@@ -128,7 +128,6 @@
|
|
<div class="flex items-center justify-center">
|
|
<div class="flex items-center justify-center">
|
|
<div>{{ scope.row.materialNo }}</div>
|
|
<div>{{ scope.row.materialNo }}</div>
|
|
<van-icon
|
|
<van-icon
|
|
- v-show="selectWlCode"
|
|
|
|
name="description-o"
|
|
name="description-o"
|
|
class="text-[#004EA2] description-o ml-1 cursor-pointer"
|
|
class="text-[#004EA2] description-o ml-1 cursor-pointer"
|
|
@click="codeCopy(scope.row.materialNo)"
|
|
@click="codeCopy(scope.row.materialNo)"
|
|
@@ -143,11 +142,12 @@
|
|
<el-pagination
|
|
<el-pagination
|
|
class="float-right"
|
|
class="float-right"
|
|
v-if="total > 0"
|
|
v-if="total > 0"
|
|
|
|
+ background
|
|
:current-page="pageNum"
|
|
:current-page="pageNum"
|
|
:page-size="20"
|
|
:page-size="20"
|
|
:pager-count="5"
|
|
:pager-count="5"
|
|
layout="prev, pager, next"
|
|
layout="prev, pager, next"
|
|
- :total="1000"
|
|
|
|
|
|
+ :total="total"
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
@@ -186,7 +186,7 @@ import { ref } from 'vue'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import { detailList } from '@/api/index.js'
|
|
import { detailList } from '@/api/index.js'
|
|
import Clipboard from 'clipboard'
|
|
import Clipboard from 'clipboard'
|
|
-import { listTools } from '@/api/index.js'
|
|
|
|
|
|
+import { listTools, getwlList } from '@/api/index.js'
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -195,9 +195,9 @@ const queryId = ref(route.query.id)
|
|
const queryToolName = ref(route.query.toolName)
|
|
const queryToolName = ref(route.query.toolName)
|
|
|
|
|
|
const wlList = ref([])
|
|
const wlList = ref([])
|
|
-const wlSelectId = ref(0)
|
|
|
|
-const selectWlCode = ref('')
|
|
|
|
-const selectMaterialName = ref('')
|
|
|
|
|
|
+// const wlSelectId = ref(0)
|
|
|
|
+// const selectWlCode = ref('')
|
|
|
|
+// const selectMaterialName = ref('')
|
|
const sytList = ref([])
|
|
const sytList = ref([])
|
|
const fileList = ref([])
|
|
const fileList = ref([])
|
|
const detailImg = ref(0)
|
|
const detailImg = ref(0)
|
|
@@ -213,18 +213,27 @@ const queryParams = ref({
|
|
})
|
|
})
|
|
const showSearch = ref(false)
|
|
const showSearch = ref(false)
|
|
const pageNum = ref(1)
|
|
const pageNum = ref(1)
|
|
-const total = ref(10)
|
|
|
|
|
|
+const total = ref(0)
|
|
|
|
+
|
|
|
|
+const getWlList = (params) => {
|
|
|
|
+ getwlList({ basisId: queryId.value, ...params }).then((res) => {
|
|
|
|
+ // console.log(res)
|
|
|
|
+ wlList.value = res.rows
|
|
|
|
+ total.value = res.total
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
|
|
const init = () => {
|
|
const init = () => {
|
|
|
|
+ // 查详情
|
|
detailList({ id: queryId.value }).then((res) => {
|
|
detailList({ id: queryId.value }).then((res) => {
|
|
const toolDetails = res.data.toolDetails || []
|
|
const toolDetails = res.data.toolDetails || []
|
|
- wlList.value = toolDetails.filter((item) => item.informationType === 'wl')
|
|
|
|
- // console.log(wlList.value)
|
|
|
|
- if (wlList.value.length > 0) {
|
|
|
|
- selectWlCode.value = wlList.value[0].materialNo
|
|
|
|
- selectMaterialName.value = wlList.value[0].materialName
|
|
|
|
- wlSelectId.value = wlList.value[0].id
|
|
|
|
- }
|
|
|
|
|
|
+ // wlList.value = toolDetails.filter((item) => item.informationType === 'wl')
|
|
|
|
+ // // console.log(wlList.value)
|
|
|
|
+ // if (wlList.value.length > 0) {
|
|
|
|
+ // // selectWlCode.value = wlList.value[0].materialNo
|
|
|
|
+ // // selectMaterialName.value = wlList.value[0].materialName
|
|
|
|
+ // wlSelectId.value = wlList.value[0].id
|
|
|
|
+ // }
|
|
sytList.value = toolDetails.filter((item) => item.informationType === 'syt')
|
|
sytList.value = toolDetails.filter((item) => item.informationType === 'syt')
|
|
if (sytList.value.length > 0) {
|
|
if (sytList.value.length > 0) {
|
|
detailImg.value = sytList.value[0].id
|
|
detailImg.value = sytList.value[0].id
|
|
@@ -244,8 +253,12 @@ const init = () => {
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
typeOptions1Ref.value = res.rows
|
|
typeOptions1Ref.value = res.rows
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ // 查物料详情的
|
|
|
|
+ getWlList({ pageNum: 1, pageSize: 5 })
|
|
}
|
|
}
|
|
init()
|
|
init()
|
|
|
|
+
|
|
const changeImg = ({ id, filePath }) => {
|
|
const changeImg = ({ id, filePath }) => {
|
|
detailImg.value = id
|
|
detailImg.value = id
|
|
sytPath.value = filePath
|
|
sytPath.value = filePath
|
|
@@ -302,20 +315,21 @@ const handleQuery = () => {
|
|
pageNum: pageNum.value,
|
|
pageNum: pageNum.value,
|
|
pageSize: 5
|
|
pageSize: 5
|
|
}
|
|
}
|
|
- console.log('搜索物料', params)
|
|
|
|
- // getList(params)
|
|
|
|
|
|
+ // console.log('搜索物料', params)
|
|
|
|
+ getWlList(params)
|
|
}
|
|
}
|
|
const searchFormRef = ref(null)
|
|
const searchFormRef = ref(null)
|
|
// 重置
|
|
// 重置
|
|
const resetQuery = () => {
|
|
const resetQuery = () => {
|
|
- searchFormRef.value.resetForm('searchFormRef')
|
|
|
|
|
|
+ searchFormRef.value.resetFields()
|
|
handleQuery()
|
|
handleQuery()
|
|
}
|
|
}
|
|
|
|
|
|
// 切换分页
|
|
// 切换分页
|
|
const handleCurrentChange = (val) => {
|
|
const handleCurrentChange = (val) => {
|
|
- console.log(val)
|
|
|
|
|
|
+ // console.log(val)
|
|
pageNum.value = val
|
|
pageNum.value = val
|
|
|
|
+ handleQuery()
|
|
}
|
|
}
|
|
|
|
|
|
// 显示搜索框
|
|
// 显示搜索框
|