| | |
| | | :hollow="item.hollow" |
| | | > |
| | | {{ item.description }} |
| | | <span style="color: #03752e;font-weight: 600" v-if="item.num > 0">{{item.stateName}}</span> |
| | | <span style="color: #f6828e;font-weight: 600" v-else>{{item.stateName}}</span> |
| | | <span style="color: #03752e" v-if="item.num > 0">{{item.num >0 ? '+' + item.num: item.num}}{{item.unit}}</span> |
| | | <span style="color: #f6828e" v-else>{{item.num}}{{item.unit}}</span> |
| | | </el-timeline-item> |
| | |
| | | import {ElMessage} from "element-plus"; |
| | | import {getAllProFlow, getFlowByCode} from "@/api/hazardousChemicals/productRecord"; |
| | | import { MoreFilled } from '@element-plus/icons-vue' |
| | | import Cookies from "js-cookie"; |
| | | const busRef = ref(); |
| | | const length = ref() |
| | | const title = ref('') |
| | |
| | | dataList: [], |
| | | active: null |
| | | }) |
| | | |
| | | const userInfo = ref() |
| | | |
| | | const openDialog = async (type, value) => { |
| | | userInfo.value = JSON.parse(Cookies.get('userInfo')) |
| | | title.value = type; |
| | | if(type === 'code'){ |
| | | state.form.code = value |
| | | }else { |
| | | state.form = value |
| | | state.form = JSON.parse(JSON.stringify(value)) |
| | | } |
| | | |
| | | await getAllFlow() |
| | | } |
| | | |
| | |
| | | let param = {} |
| | | if(title.value == 'pro'){ |
| | | param = { |
| | | productId: state.form.id |
| | | productId: state.form.id, |
| | | companyId: userInfo.value.companyId |
| | | } |
| | | }else { |
| | | param = { |
| | | productId: state.form.productId |
| | | productId: state.form.productId, |
| | | companyId: userInfo.value.companyId |
| | | } |
| | | } |
| | | const res = await getAllProFlow(param) |
| | |
| | | return { |
| | | ...item, |
| | | unit: item.productBasic.unit, |
| | | description: `${item.updateTime} ${item.user.departName}部门 ${item.user.name} 进行了 ${item.state == 0 ? '批量导入' : item.state == 3 ? '标签作废' : '销售'}`, |
| | | stateName: item.state ==0 ?'入库': item.state ==1 ? '取用' :item.state ==2 ? '归还': item.state ==3 ? '标签作废' : item.state ==4 ? '用尽登记':item.state ==5 ? '销售' : '', |
| | | description: `${item.updateTime} ${item.user.departName ? item.user.departName +'部门' : ''} ${item.user.name} 进行了 `, |
| | | size: 'large', |
| | | type: 'primary', |
| | | icon: MoreFilled, |
| | |
| | | let param = {} |
| | | if(title.value == 'raw'){ |
| | | param = { |
| | | hazmatId: state.form.id |
| | | hazmatId: state.form.id, |
| | | companyId: userInfo.value.companyId |
| | | } |
| | | }else { |
| | | param = { |
| | | hazmatId: state.form.hazmatId |
| | | hazmatId: state.form.hazmatId, |
| | | companyId: userInfo.value.companyId |
| | | } |
| | | } |
| | | const res = await getAllRawFlow(param) |
| | |
| | | return { |
| | | ...item, |
| | | unit:item.hazmatBasic.unit, |
| | | description: `${item.updateTime} ${item.user.departName}部门 ${item.user.name} 进行了 ${item.state ==0?'批量导入': item.state ==1?'取用' :item.state ==2?'归还':item.state ==3?'标签作废' :''}`, |
| | | stateName: item.state ==0 ?'入库': item.state ==1 ? '取用' :item.state ==2 ? '归还': item.state ==3 ? '标签作废' : item.state ==4 ? '用尽登记':item.state ==5 ? '销售' : item.state ==6? '零头入库':'', |
| | | description: `${item.updateTime} ${item.user.departName ? item.user.departName +'部门' : ''} ${item.user.name} 进行了 `, |
| | | size: 'large', |
| | | type: 'primary', |
| | | icon: MoreFilled, |
| | |
| | | } |
| | | }else if(title.value == 'code'){ |
| | | const param = { |
| | | code: state.form.code |
| | | code: state.form.code, |
| | | companyId: userInfo.value.companyId |
| | | } |
| | | const res = await getFlowByCode(param) |
| | | if(res.code == 200){ |
| | |
| | | return { |
| | | ...item, |
| | | unit:item.hazmatBasic.unit, |
| | | description: `${item.updateTime} ${item.user.departName}部门 ${item.user.name} 进行了 ${item.state ==0?'批量导入': item.state ==1?'取用' :item.state ==2?'归还':item.state ==3?'标签作废' :''}`, |
| | | stateName: item.state ==0 ?'入库': item.state ==1 ? '取用' :item.state ==2 ? '归还': item.state ==3 ? '标签作废' : item.state ==4 ? '用尽登记':item.state ==5 ? '销售' : item.state ==6? '零头入库':'', |
| | | description: `${item.updateTime} ${item.user.departName ? item.user.departName +'部门' : ''} ${item.user.name} 进行了 `, |
| | | size: 'large', |
| | | type: 'primary', |
| | | icon: MoreFilled, |
| | |
| | | return { |
| | | ...item, |
| | | unit:item.productBasic.unit, |
| | | description: `${item.updateTime} ${item.user.departName}部门 ${item.user.name} 进行了 ${item.state == 0 ? '批量导入' : item.state == 3 ? '标签作废' : '销售'}`, |
| | | stateName: item.state ==0 ?'入库': item.state ==1 ? '取用' :item.state ==2 ? '归还': item.state ==3 ? '标签作废' : item.state ==4 ? '用尽登记':item.state ==5 ? '销售' : '', |
| | | description: `${item.updateTime} ${item.user.departName? item.user.departName +'部门' : ''} ${item.user.name} 进行了 `, |
| | | size: 'large', |
| | | type: 'primary', |
| | | icon: MoreFilled, |