Browse Source

检验策略修改

master
zhang_li 1 year ago
parent
commit
f287cece11
  1. 17
      src/components/Descriptions/src/Descriptions.vue
  2. 32
      src/components/Detail/src/Detail.vue
  3. 23
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue
  4. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  5. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

17
src/components/Descriptions/src/Descriptions.vue

@ -15,6 +15,9 @@ const mobile = computed(() => appStore.getMobile)
const attrs = useAttrs()
const slots = useSlots()
const height = ref('200px')
const isShow = ref(false)
const props = defineProps({
title: propTypes.string.def(''),
@ -68,6 +71,15 @@ const toggleClick = () => {
show.value = !unref(show)
}
}
const showAll = () =>{
if(isShow.value){
height.value ='200px'
}else{
height.value ='auto'
}
isShow.value = !isShow.value
}
</script>
<template>
@ -96,7 +108,7 @@ const toggleClick = () => {
<Icon v-if="collapse" :icon="show ? 'ep:arrow-down' : 'ep:arrow-up'" />
</div>
<ElCollapseTransition>
<ElCollapseTransition :style="{height: height,overflow: 'hidden'}">
<div v-show="show" :class="[`${prefixCls}-content`]">
<ElDescriptions
:column="props.columns"
@ -143,6 +155,9 @@ const toggleClick = () => {
</ElDescriptions>
</div>
</ElCollapseTransition>
<div class="flex align-center justify-center">
<el-button type="primary" class="mt-20px" @click="showAll">{{!isShow?'展开':'收起'}}</el-button>
</div>
</div>
</template>

32
src/components/Detail/src/Detail.vue

@ -110,6 +110,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
defineOptions({ name: 'Detail' })
const message = useMessage() //
const { t } = useI18n() //
@ -118,6 +119,7 @@ const routeName = ref()
routeName.value = route.name
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail'
const props = defineProps({
//
tabs: {
@ -290,12 +292,18 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
getFileList()
getChangeRecordList()
//
if(routeName.value.indexOf('Job') > -1){
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null) //
]
}else{
HeadButttondata.value = [
defaultButtons.defaultAddBtn({
hide: isShowMainButton(row, ['1'])
}), //
defaultButtons.defaultFilterBtn(null) //
]
}
//
buttondata.value = [
defaultButtons.mainListEditBtn({
@ -437,28 +445,44 @@ const handleDelete = async (id: number) => {
}
//
const searchFormClick = (searchData) => {
tableObjectRef.value.params = {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params = {
isSearch: true,
filters: searchData.filters
? searchData.filters
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
}
getList() //
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
tableObjectRef.value.tableList = []
const { getList } = tableMethods
getList()
// tableObjectRef.value.params = {
// isSearch: true,
// filters: searchData.filters
// ? searchData.filters
// : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
// }
// getList() //
}
//
watch(
() => props.apiPage,
() =>props.apiPage,
() => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params.masterId = masterParmas.value.masterId
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
const { getList } = tableMethods
getList()
}
},
)
</script>
<style lang="scss">

23
src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue

@ -146,7 +146,7 @@
<!-- 检验方式 -->
<el-form-item label="检验方式" class="flex-top">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.InspectType">
<el-radio-group v-model="formData.configuration.InspectType" @change="changeInspectType">
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.INSPECT_TYPE)"
@ -158,7 +158,7 @@
</el-form-item>
</el-col>
<!-- 抽检方式 -->
<el-col :span="24">
<el-col :span="24" v-if="formData.configuration.InspectType == 'SAMPLING'">
<el-form-item label="抽检方式" class="flex-top">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.SampleMethod">
@ -174,7 +174,7 @@
</el-form-item>
</el-col>
<!-- 抽检规则 -->
<el-col :span="24">
<el-col :span="24" v-if="formData.configuration.InspectType == 'SAMPLING'">
<el-form-item label="抽检规则" class="flex-top" prop="configurationRules">
<div
style="flex: 1; display: flex; align-items: center; margin-bottom: 10px"
@ -346,10 +346,19 @@ const changeSupplierType = (e) => {
getFormSupplierList()
}
getFormSupplierList()
//
function changeInspectType(e){
if (e == 'SAMPLING') {
formData.value.configuration.SampleMethod='QTY'
formData.value.configuration.AqlList=[{
FloorQty: 1,
CeilingQty: 2,
SampleValue: 1
}]
}
}
//
function changeSampleMethod(e) {
console.log(e)
if (e == 'PERCENT') {
formData.value.configuration.AqlList.forEach((cur) => {
if (cur.SampleValue > 100) {
@ -402,6 +411,10 @@ const submitForm = async () => {
if (!valid) return
//
formLoading.value = true
if(formData.value.configuration.InspectType != 'SAMPLING'){
formData.value.configuration.SampleMethod= ''
formData.value.configuration.AqlList=[]
}
try {
let data = {
id: formData.value.id,

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -375,7 +375,7 @@ const changeTabs = (data) =>{
detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
}else if(data.prop == 'scarceGoodsDetail'){
apiPage.value = PurchasereceiptRequestDetailApi.getScarceGoodsDetailPage
detailAllSchemas.value = SupplierdeliverRecordDetail.allSchemas
detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
}
}

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -1006,3 +1006,5 @@ export const PurchasereceiptRequestDetailRules = reactive({
{ required: true, message: '请输入物品代码', trigger: 'change' }
],
})

Loading…
Cancel
Save