Browse Source

检验策略修改

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

30
src/components/Detail/src/Detail.vue

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

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

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

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

@ -375,7 +375,7 @@ const changeTabs = (data) =>{
detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
}else if(data.prop == 'scarceGoodsDetail'){ }else if(data.prop == 'scarceGoodsDetail'){
apiPage.value = PurchasereceiptRequestDetailApi.getScarceGoodsDetailPage 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' } { required: true, message: '请输入物品代码', trigger: 'change' }
], ],
}) })

Loading…
Cancel
Save