| | |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisibleLabel = ref(false) |
| | | const printVisible= ref(false) |
| | | const dialogTableVisibleSetup = ref(false) |
| | | let selectRecords = ref(null) |
| | | |
| | | const xGrid = ref(null) |
| | |
| | | |
| | | |
| | | }) |
| | | let filterDataPrint =ref( {}) |
| | | let printSetupDate = { |
| | | id:'', |
| | | printType:'', |
| | | printTypeName:'', |
| | | printState:'' |
| | | } |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | |
| | | } |
| | | }) |
| | | |
| | | request.post(`/processCard/printSetup`, filterDataPrint.value).then((res) => { |
| | | if (res.code == 200) { |
| | | printSetupDate = deepClone(res.data.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | buttons: [ |
| | | {code: 'print', name: t('processCard.print'), status: 'primary'}, |
| | | {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'}, |
| | | {code: 'printSetup', name: t('processCard.printSetup'),status: 'primary'}, |
| | | |
| | | ], |
| | | // import: false, |
| | |
| | | |
| | | break |
| | | } |
| | | case 'printSetup': { |
| | | dialogTableVisibleSetup.value=true |
| | | break |
| | | } |
| | | case 'sort': { |
| | | const $table = xGridDetail.value |
| | | let data = $table.getTableData().fullData |
| | |
| | | }, |
| | | } |
| | | |
| | | let checkbox= ref({ |
| | | customerName:0, |
| | | orderId:0, |
| | | typeName:0, |
| | | specifications:0, |
| | | project:0, |
| | | remarks:0, |
| | | glassChild:0, |
| | | processingNote:0, |
| | | }) |
| | | |
| | | const changeDate = ()=>{ |
| | | |
| | | request.post(`/processCard/updatePrintSetup`, checkbox.value).then((res) => { |
| | | if (res.code == 200) { |
| | | dialogTableVisibleSetup.value=false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | |
| | | const detailGridOptions = reactive({ |
| | |
| | | let detail =ref(produceDetailList.value) |
| | | xGridDetail.value.reloadData(detail.value) |
| | | } |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | </vxe-grid> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="dialogTableVisibleSetup" :title="$t('processCard.printSetup')" style="width: 70%;height:75% "> |
| | | <div> |
| | | <el-button @click="changeDate" id="searchButton" type="primary" >{{ $t('basicData.save') }}</el-button> |
| | | </div> |
| | | |
| | | |
| | | <div class="order-primary" > |
| | | <el-checkbox v-model="checkbox.customerName" :checked="printSetupDate[0].printState===1">{{ $t('customer.customerName') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.project" :checked="printSetupDate[1].printState===1">{{ $t('order.project') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.orderId" :checked="printSetupDate[6].printState===1">{{ $t('order.orderId') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.specifications" :checked="printSetupDate[2].printState===1">{{ $t('processCard.specificationQuantity') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.remarks" :checked="printSetupDate[3].printState===1">{{ $t('order.floorNumber') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.processingNote" :checked="printSetupDate[4].printState===1">{{ $t('order.processingNote') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.glassChild" :checked="printSetupDate[5].printState===1">{{ $t('processCard.singlePieceProductName') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.typeName" :checked="printSetupDate[7].printState===1">{{ $t('processCard.productType') }}</el-checkbox> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | const setupData = ref({ |
| | | }) |
| | | let printSetupData = { |
| | | printState:'' |
| | | } |
| | | |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | |
| | | |
| | | ) |
| | | |
| | | request.post(`/processCard/printSetup`, setupData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | printSetupData = deepClone(res.data.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | |
| | | <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button> |
| | | <div id="printFlowCard" > |
| | | <div id="entirety" v-for="(item,id) in labelList" > |
| | | <div v-show="printSetupData[0].printState" class="row1">{{ item.customer_name }}</div> |
| | | <div v-show="printSetupData[6].printState || printSetupData[7].printState" class="row2"> |
| | | <span v-show="printSetupData[6].printState">{{ item.order_id }}</span> |
| | | <span v-show="printSetupData[7].printState">{{ item.type_name }}</span> |
| | | <div class="row1">{{ item.customer_name }}</div> |
| | | <div class="row2"> |
| | | <span>{{ item.order_id }}</span> |
| | | <span>{{ item.type_name }}</span> |
| | | </div> |
| | | <div v-show="printSetupData[2].printState" class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div> |
| | | <div v-show="printSetupData[1].printState || printSetupData[3].printState" class="row5"> |
| | | <span v-show="printSetupData[1].printState">{{item.project}}</span> |
| | | <span v-show="printSetupData[3].printState">{{ item.remarks }}</span> |
| | | <div class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div> |
| | | <div class="row5"> |
| | | <span>{{item.project}}</span> |
| | | <span>{{ item.remarks }}</span> |
| | | </div> |
| | | <div v-show="printSetupData[5].printState || printSetupData[4].printState" class="row6"> |
| | | <span v-show="printSetupData[5].printState">{{item.glass_child}}</span> |
| | | <span v-show="printSetupData[4].printState">{{item.processing_note}}</span></div> |
| | | <div class="row6"> |
| | | <span>{{item.glass_child}}</span> |
| | | <span>{{item.processing_note}}</span></div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PrintSetup; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.common.Result; |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("打印标签设置查询") |
| | | @SaCheckPermission("PrintFlowCard.search") |
| | | @PostMapping ("/printSetup") |
| | | public Result printSetup(@RequestBody PrintSetup printSetup){ |
| | | return Result.seccess(flowCardService.printSetup(printSetup)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("修改打印标签内容") |
| | | @SaCheckPermission("PrintFlowCard.search") |
| | | @PostMapping("/updatePrintSetup") |
| | | public Result updatePrintSetup(@RequestBody Map<String,Object> object) |
| | | { |
| | | return Result.seccess(flowCardService.updatePrintSetup(object)); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PrintSetup; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.sql.Date; |
| | |
| | | |
| | | Boolean printSortMp(String processId, Integer orderNumber, Integer technologyNumber, Integer sort); |
| | | |
| | | List<Map<String, String>> selectPrintSetup(PrintSetup printSetup); |
| | | |
| | | Boolean updatePrintSetup(String alias,Integer printState); |
| | | } |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PrintSetup; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | |
| | | return true; |
| | | } |
| | | |
| | | public Map<String, Object> printSetup(PrintSetup printSetup) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintSetup(printSetup)); |
| | | return map; |
| | | } |
| | | public Boolean updatePrintSetup(Map<String, Object> object) { |
| | | System.out.println(object); |
| | | boolean saveState = true; |
| | | String[] stringList=new String[]{"customerName","orderId","typeName","specifications","project","remarks","glassChild","processingNote"}; |
| | | for(String strings:stringList){ |
| | | if (object.get(strings) != null) { |
| | | if (Objects.equals(object.get(strings).toString(), "true")){ |
| | | flowCardMapper.updatePrintSetup(strings,1); |
| | | }else { |
| | | flowCardMapper.updatePrintSetup(strings,0); |
| | | } |
| | | }else { |
| | | saveState=false; |
| | | } |
| | | } |
| | | return saveState; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | and technology_number = #{technologyNumber} |
| | | </update> |
| | | |
| | | <select id="selectPrintSetup"> |
| | | select id, |
| | | print_type as printType, |
| | | print_type_name as printTypeName, |
| | | print_state as printState |
| | | from pp.print_setup |
| | | </select> |
| | | |
| | | <update id="updatePrintSetup"> |
| | | update pp.print_setup set print_state=#{printState} where alias=#{alias} |
| | | </update> |
| | | </mapper> |