正在显示
11 个修改的文件
包含
800 行增加
和
46 行删除
不能预览此文件类型
| @@ -80,6 +80,29 @@ export function selectUp(url,parameter){ | @@ -80,6 +80,29 @@ export function selectUp(url,parameter){ | ||
| 80 | params: parameter | 80 | params: parameter |
| 81 | }) | 81 | }) |
| 82 | } | 82 | } |
| 83 | +//生产计划查看 | ||
| 84 | +export function queryBynumber(url,parameter){ | ||
| 85 | + return axios({ | ||
| 86 | + url:url, | ||
| 87 | + method:'get', | ||
| 88 | + params:parameter | ||
| 89 | + }) | ||
| 90 | +} | ||
| 91 | +//工序查询 | ||
| 92 | +export function querygx(url,parameter){ | ||
| 93 | + return axios({ | ||
| 94 | + url:url, | ||
| 95 | + method:'get', | ||
| 96 | + params:parameter | ||
| 97 | + }) | ||
| 98 | +} | ||
| 99 | +//下载 | ||
| 100 | +export function downloadLocal(url){ | ||
| 101 | + return axios({ | ||
| 102 | + url:url, | ||
| 103 | + method:'get', | ||
| 104 | + }) | ||
| 105 | +} | ||
| 83 | 106 | ||
| 84 | export function getUserList(parameter) { | 107 | export function getUserList(parameter) { |
| 85 | return axios({ | 108 | return axios({ |
| @@ -249,7 +249,9 @@ export const JeecgListMixin = { | @@ -249,7 +249,9 @@ export const JeecgListMixin = { | ||
| 249 | this.$refs.tanForm.title = "工资计算"; | 249 | this.$refs.tanForm.title = "工资计算"; |
| 250 | this.$refs.tanForm.disableSubmit = false; | 250 | this.$refs.tanForm.disableSubmit = false; |
| 251 | }, | 251 | }, |
| 252 | + | ||
| 252 | handleEdit: function (record) { | 253 | handleEdit: function (record) { |
| 254 | + console.log(record) | ||
| 253 | this.$refs.modalForm.edit(record); | 255 | this.$refs.modalForm.edit(record); |
| 254 | this.$refs.modalForm.title = "编辑"; | 256 | this.$refs.modalForm.title = "编辑"; |
| 255 | this.$refs.modalForm.disableSubmit = false; | 257 | this.$refs.modalForm.disableSubmit = false; |
| @@ -288,6 +290,15 @@ export const JeecgListMixin = { | @@ -288,6 +290,15 @@ export const JeecgListMixin = { | ||
| 288 | this.$refs.modalForm.title = "详情"; | 290 | this.$refs.modalForm.title = "详情"; |
| 289 | this.$refs.modalForm.disableSubmit = true; | 291 | this.$refs.modalForm.disableSubmit = true; |
| 290 | }, | 292 | }, |
| 293 | + // 生产计划查看 | ||
| 294 | + handleDetail2: function (record) { | ||
| 295 | + console.log("生产计划查看:",record.orderNumber) | ||
| 296 | + this.$refs.modalForm.edit(record); | ||
| 297 | + this.$refs.modalForm.queryBynumber(record.orderNumber); | ||
| 298 | + this.$refs.modalForm.querygx(record.orderNumber,record.productType) | ||
| 299 | + this.$refs.modalForm.title = "生产订单>详情"; | ||
| 300 | + this.$refs.modalForm.disableSubmit = true; | ||
| 301 | + }, | ||
| 291 | /* 导出 */ | 302 | /* 导出 */ |
| 292 | handleExportXls2() { | 303 | handleExportXls2() { |
| 293 | let paramsStr = encodeURI(JSON.stringify(this.getQueryParams())); | 304 | let paramsStr = encodeURI(JSON.stringify(this.getQueryParams())); |
| @@ -395,6 +406,7 @@ export const JeecgListMixin = { | @@ -395,6 +406,7 @@ export const JeecgListMixin = { | ||
| 395 | let url = getFileAccessHttpUrl(text) | 406 | let url = getFileAccessHttpUrl(text) |
| 396 | window.open(url); | 407 | window.open(url); |
| 397 | }, | 408 | }, |
| 398 | - } | 409 | + }, |
| 410 | + | ||
| 399 | 411 | ||
| 400 | } | 412 | } |
src/templates/工资导入.xlsx
0 → 100644
不能预览此文件类型
| @@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
| 10 | </a-form-item> | 10 | </a-form-item> |
| 11 | </a-col> | 11 | </a-col> |
| 12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| 13 | - <a-form-item label="岗位" > | 13 | + <a-form-item label="岗位"> |
| 14 | <a-select ref="select" v-model="queryParam.jobTitle" placeholder="请输入岗位" style="width: 285px"> | 14 | <a-select ref="select" v-model="queryParam.jobTitle" placeholder="请输入岗位" style="width: 285px"> |
| 15 | <a-select-option value="OfficeAdministrative">办公室行政人员</a-select-option> | 15 | <a-select-option value="OfficeAdministrative">办公室行政人员</a-select-option> |
| 16 | <a-select-option value="WorkshopDirector">车间管理员</a-select-option> | 16 | <a-select-option value="WorkshopDirector">车间管理员</a-select-option> |
| @@ -26,8 +26,8 @@ | @@ -26,8 +26,8 @@ | ||
| 26 | </a-select> | 26 | </a-select> |
| 27 | </a-form-item> | 27 | </a-form-item> |
| 28 | </a-col> | 28 | </a-col> |
| 29 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
| 30 | - <a-form-item label="是否在职" > | 29 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| 30 | + <a-form-item label="是否在职"> | ||
| 31 | <a-select ref="select" v-model="queryParam.notes" placeholder="请选择是否在职" style="width: 285px"> | 31 | <a-select ref="select" v-model="queryParam.notes" placeholder="请选择是否在职" style="width: 285px"> |
| 32 | <a-select-option value="在职">在职</a-select-option> | 32 | <a-select-option value="在职">在职</a-select-option> |
| 33 | <a-select-option value="离职">离职</a-select-option> | 33 | <a-select-option value="离职">离职</a-select-option> |
| @@ -46,7 +46,17 @@ | @@ -46,7 +46,17 @@ | ||
| 46 | <!-- 操作按钮区域 --> | 46 | <!-- 操作按钮区域 --> |
| 47 | <div class="table-operator"> | 47 | <div class="table-operator"> |
| 48 | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | 48 | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| 49 | - | 49 | + <a-button type="primary" icon="download" @click="handleExportXls('tbl_salary_suanfa')">导出</a-button> |
| 50 | + <a-upload | ||
| 51 | + name="file" | ||
| 52 | + :showUploadList="false" | ||
| 53 | + :multiple="false" | ||
| 54 | + :headers="tokenHeader" | ||
| 55 | + :action="importExcelUrl" | ||
| 56 | + @change="handleImportExcel" | ||
| 57 | + > | ||
| 58 | + <a-button type="primary" icon="import">导入</a-button> | ||
| 59 | + </a-upload> | ||
| 50 | <j-super-query | 60 | <j-super-query |
| 51 | :fieldList="superFieldList" | 61 | :fieldList="superFieldList" |
| 52 | ref="superQueryModal" | 62 | ref="superQueryModal" |
| @@ -136,40 +146,7 @@ export default { | @@ -136,40 +146,7 @@ export default { | ||
| 136 | return parseInt(index) + 1 | 146 | return parseInt(index) + 1 |
| 137 | }, | 147 | }, |
| 138 | }, | 148 | }, |
| 139 | - { | ||
| 140 | - title: '岗位', | ||
| 141 | - align: 'center', | ||
| 142 | - dataIndex: 'jobTitle', | ||
| 143 | - fixed: 'left', | ||
| 144 | - width: 100, | ||
| 145 | - customRender: function (text) { | ||
| 146 | - if (text === 'OfficeAdministrative') { | ||
| 147 | - return '办公室行政人员' | ||
| 148 | - } else if (text === 'WorkshopDirector') { | ||
| 149 | - return '车间管理员' | ||
| 150 | - } else if (text === 'WorkshopTechnicalManager') { | ||
| 151 | - return '车间技术总管' | ||
| 152 | - } else if (text === 'WorkshopTechnician') { | ||
| 153 | - return '车间技术员' | ||
| 154 | - } else if (text === 'WorkshopAuxiliaryPersonnel') { | ||
| 155 | - return '车间辅助人员' | ||
| 156 | - } else if (text === 'PurchasingOfficer') { | ||
| 157 | - return '采购员' | ||
| 158 | - } else if (text === 'ProcurementSupervisor') { | ||
| 159 | - return '采购主管' | ||
| 160 | - } else if (text === 'Assembler') { | ||
| 161 | - return '装配工' | ||
| 162 | - } else if (text === 'AssemblySupervisor') { | ||
| 163 | - return '装配主管' | ||
| 164 | - } else if (text === 'OtherWorker') { | ||
| 165 | - return '其他' | ||
| 166 | - } else if (text === 'WorkshopGeneralWorker') { | ||
| 167 | - return '普工' | ||
| 168 | - } else { | ||
| 169 | - return text | ||
| 170 | - } | ||
| 171 | - }, | ||
| 172 | - }, | 149 | + |
| 173 | { | 150 | { |
| 174 | title: '工号', | 151 | title: '工号', |
| 175 | align: 'center', | 152 | align: 'center', |
| @@ -180,6 +157,8 @@ export default { | @@ -180,6 +157,8 @@ export default { | ||
| 180 | { | 157 | { |
| 181 | title: '姓名', | 158 | title: '姓名', |
| 182 | align: 'center', | 159 | align: 'center', |
| 160 | + fixed: 'left', | ||
| 161 | + width: 100, | ||
| 183 | dataIndex: 'userName', | 162 | dataIndex: 'userName', |
| 184 | }, | 163 | }, |
| 185 | { | 164 | { |
| @@ -207,6 +186,39 @@ export default { | @@ -207,6 +186,39 @@ export default { | ||
| 207 | dataIndex: 'phone', | 186 | dataIndex: 'phone', |
| 208 | }, | 187 | }, |
| 209 | { | 188 | { |
| 189 | + title: '岗位', | ||
| 190 | + align: 'center', | ||
| 191 | + dataIndex: 'jobTitle', | ||
| 192 | + | ||
| 193 | + customRender: function (text) { | ||
| 194 | + if (text === 'OfficeAdministrative') { | ||
| 195 | + return '办公室行政人员' | ||
| 196 | + } else if (text === 'WorkshopDirector') { | ||
| 197 | + return '车间管理员' | ||
| 198 | + } else if (text === 'WorkshopTechnicalManager') { | ||
| 199 | + return '车间技术总管' | ||
| 200 | + } else if (text === 'WorkshopTechnician') { | ||
| 201 | + return '车间技术员' | ||
| 202 | + } else if (text === 'WorkshopAuxiliaryPersonnel') { | ||
| 203 | + return '车间辅助人员' | ||
| 204 | + } else if (text === 'PurchasingOfficer') { | ||
| 205 | + return '采购员' | ||
| 206 | + } else if (text === 'ProcurementSupervisor') { | ||
| 207 | + return '采购主管' | ||
| 208 | + } else if (text === 'Assembler') { | ||
| 209 | + return '装配工' | ||
| 210 | + } else if (text === 'AssemblySupervisor') { | ||
| 211 | + return '装配主管' | ||
| 212 | + } else if (text === 'OtherWorker') { | ||
| 213 | + return '其他' | ||
| 214 | + } else if (text === 'WorkshopGeneralWorker') { | ||
| 215 | + return '普工' | ||
| 216 | + } else { | ||
| 217 | + return text | ||
| 218 | + } | ||
| 219 | + }, | ||
| 220 | + }, | ||
| 221 | + { | ||
| 210 | title: '学历', | 222 | title: '学历', |
| 211 | align: 'center', | 223 | align: 'center', |
| 212 | dataIndex: 'xueli', | 224 | dataIndex: 'xueli', |
| @@ -256,7 +268,7 @@ export default { | @@ -256,7 +268,7 @@ export default { | ||
| 256 | dataIndex: 'workingPrice', | 268 | dataIndex: 'workingPrice', |
| 257 | }, | 269 | }, |
| 258 | { | 270 | { |
| 259 | - title: '全勤奖', | 271 | + title: '全勤奖励', |
| 260 | align: 'center', | 272 | align: 'center', |
| 261 | dataIndex: 'fullAttendanceAward', | 273 | dataIndex: 'fullAttendanceAward', |
| 262 | }, | 274 | }, |
| @@ -289,12 +301,19 @@ export default { | @@ -289,12 +301,19 @@ export default { | ||
| 289 | list: '/salary/base/list', | 301 | list: '/salary/base/list', |
| 290 | delete: '/salary/base/del', | 302 | delete: '/salary/base/del', |
| 291 | deleteBatch: '/salary/base/deleteBatch', | 303 | deleteBatch: '/salary/base/deleteBatch', |
| 304 | + exportXlsUrl: '/salary/base/exportXls', | ||
| 305 | + importExcelUrl: 'salary/base/importExcel', | ||
| 292 | }, | 306 | }, |
| 293 | } | 307 | } |
| 294 | }, | 308 | }, |
| 295 | created() { | 309 | created() { |
| 296 | this.getSuperFieldList() | 310 | this.getSuperFieldList() |
| 297 | }, | 311 | }, |
| 312 | + computed: { | ||
| 313 | + importExcelUrl: function(){ | ||
| 314 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
| 315 | + }, | ||
| 316 | + }, | ||
| 298 | methods: { | 317 | methods: { |
| 299 | // handleAddUser() { | 318 | // handleAddUser() { |
| 300 | // this.$refs.modalFormUser.add() | 319 | // this.$refs.modalFormUser.add() |
| @@ -52,6 +52,10 @@ | @@ -52,6 +52,10 @@ | ||
| 52 | @handleSuperQuery="handleSuperQuery" | 52 | @handleSuperQuery="handleSuperQuery" |
| 53 | ></j-super-query> | 53 | ></j-super-query> |
| 54 | <a-button type="primary" @click="selectup(salaryMonth)" icon="search">计算</a-button> | 54 | <a-button type="primary" @click="selectup(salaryMonth)" icon="search">计算</a-button> |
| 55 | + <a-button type="primary" @click="downloadFile2('工资导入.xlsx')" download="工资导入.xlsx">导入模版下载</a-button> | ||
| 56 | + <a href="https://feite-1300636907.cos.ap-chongqing.myqcloud.com/工资导入.xlsx" download="工资导入.xlsx" | ||
| 57 | + >下载工资导入文件</a | ||
| 58 | + > | ||
| 55 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 59 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| 56 | <a-menu slot="overlay"> | 60 | <a-menu slot="overlay"> |
| 57 | <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item> | 61 | <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item> |
| @@ -59,7 +63,8 @@ | @@ -59,7 +63,8 @@ | ||
| 59 | <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | 63 | <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> |
| 60 | </a-dropdown> | 64 | </a-dropdown> |
| 61 | </div> | 65 | </div> |
| 62 | - | 66 | + <!-- https://feite-1300636907.cos.ap-chongqing.myqcloud.com/工资导入.xlsx --> |
| 67 | + <!-- http://factory.zgftlm.com/mnt/docker/app/factory/工资导入.xlsx --> | ||
| 63 | <!-- table区域-begin --> | 68 | <!-- table区域-begin --> |
| 64 | <div> | 69 | <div> |
| 65 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px"> | 70 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px"> |
| @@ -117,6 +122,9 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' | @@ -117,6 +122,9 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
| 117 | import TblSalaryCalculationModal from './modules/TblSalaryCalculationModal' | 122 | import TblSalaryCalculationModal from './modules/TblSalaryCalculationModal' |
| 118 | import TblSalaryCalculationBase from './TblSalaryCalculationBase' | 123 | import TblSalaryCalculationBase from './TblSalaryCalculationBase' |
| 119 | import TblSalaryCalculationModalTan from './modules/TblSalaryCalculationModalTan' | 124 | import TblSalaryCalculationModalTan from './modules/TblSalaryCalculationModalTan' |
| 125 | +import Vue from 'vue' | ||
| 126 | +import { ACCESS_TOKEN } from '@/store/mutation-types' | ||
| 127 | +import Axios from 'axios' | ||
| 120 | // import TblSalaryCalculationModalTan from './modules/TblSalaryCalculationModalTan.vue' | 128 | // import TblSalaryCalculationModalTan from './modules/TblSalaryCalculationModalTan.vue' |
| 121 | export default { | 129 | export default { |
| 122 | name: 'TblSalaryCalculationList', | 130 | name: 'TblSalaryCalculationList', |
| @@ -198,7 +206,7 @@ export default { | @@ -198,7 +206,7 @@ export default { | ||
| 198 | align: 'center', | 206 | align: 'center', |
| 199 | dataIndex: 'personalTax', | 207 | dataIndex: 'personalTax', |
| 200 | }, | 208 | }, |
| 201 | - | 209 | + |
| 202 | { | 210 | { |
| 203 | title: '实发工资', | 211 | title: '实发工资', |
| 204 | align: 'center', | 212 | align: 'center', |
| @@ -225,6 +233,7 @@ export default { | @@ -225,6 +233,7 @@ export default { | ||
| 225 | deleteBatch: '/salary/calculation/deleteBatch', | 233 | deleteBatch: '/salary/calculation/deleteBatch', |
| 226 | exportXlsUrl: '/salary/calculation/exportXls', | 234 | exportXlsUrl: '/salary/calculation/exportXls', |
| 227 | importExcelUrl: '/salary/calculation/importExcel', | 235 | importExcelUrl: '/salary/calculation/importExcel', |
| 236 | + downloadLocal: '/salary/calculation/downloadLocal', | ||
| 228 | }, | 237 | }, |
| 229 | dictOptions: {}, | 238 | dictOptions: {}, |
| 230 | superFieldList: [], | 239 | superFieldList: [], |
| @@ -239,12 +248,50 @@ export default { | @@ -239,12 +248,50 @@ export default { | ||
| 239 | }, | 248 | }, |
| 240 | }, | 249 | }, |
| 241 | methods: { | 250 | methods: { |
| 251 | + async downloadFile2(filePath) { | ||
| 252 | + try { | ||
| 253 | + if (!filePath) { | ||
| 254 | + throw new Error('File path is empty.') | ||
| 255 | + } | ||
| 256 | + let token = Vue.ls.get(ACCESS_TOKEN) | ||
| 257 | + console.log(token) | ||
| 258 | + // 发起文件下载请求 | ||
| 259 | + const response = await fetch(`http://localhost:8080/jeecg-boot/salary/calculation/download/${filePath}`, { | ||
| 260 | + method: 'GET', | ||
| 261 | + mode: 'cors', | ||
| 262 | + headers: { | ||
| 263 | + 'Access-Control-Expose-Headers': 'Content-Disposition', | ||
| 264 | + 'X-Access-Token': `${token}`, // 添加身份验证信息 | ||
| 265 | + }, | ||
| 266 | + credentials: 'include', // 允许发送 Cookie | ||
| 267 | + }) | ||
| 268 | + if (!response.ok) { | ||
| 269 | + throw new Error(`HTTP error! status: ${response.status}`) | ||
| 270 | + } | ||
| 271 | + const blob = await response.blob() | ||
| 272 | + const filename = filePath.split('/').pop() // 提取文件名 | ||
| 273 | + | ||
| 274 | + // 创建临时链接 | ||
| 275 | + const url = window.URL.createObjectURL(blob) | ||
| 276 | + const link = document.createElement('a') | ||
| 277 | + link.href = url | ||
| 278 | + link.setAttribute('download', filename) | ||
| 279 | + document.body.appendChild(link) | ||
| 280 | + link.click() | ||
| 281 | + | ||
| 282 | + // 释放对象 URL | ||
| 283 | + window.URL.revokeObjectURL(url) | ||
| 284 | + document.body.removeChild(link) | ||
| 285 | + } catch (error) { | ||
| 286 | + console.error('Failed to download file:', error) | ||
| 287 | + } | ||
| 288 | + }, | ||
| 289 | + | ||
| 242 | // handleAddUser(){ | 290 | // handleAddUser(){ |
| 243 | // this.$refs.modalFormUser.add(); | 291 | // this.$refs.modalFormUser.add(); |
| 244 | // this.$refs.modalFormUser.title = "新增"; | 292 | // this.$refs.modalFormUser.title = "新增"; |
| 245 | // this.$refs.modalFormUser.disableSubmit = false; | 293 | // this.$refs.modalFormUser.disableSubmit = false; |
| 246 | // }, | 294 | // }, |
| 247 | - | ||
| 248 | handleMonthChange(value) { | 295 | handleMonthChange(value) { |
| 249 | this.queryParam.salaryMonth = value ? value.format('YYYY-MM') : null | 296 | this.queryParam.salaryMonth = value ? value.format('YYYY-MM') : null |
| 250 | }, | 297 | }, |
| @@ -176,13 +176,13 @@ export default { | @@ -176,13 +176,13 @@ export default { | ||
| 176 | socialPerson: [{ required: true, message: '请输入社保个人!' }], | 176 | socialPerson: [{ required: true, message: '请输入社保个人!' }], |
| 177 | workingPrice: [{ required: true, message: '请输入工时单价!' }], | 177 | workingPrice: [{ required: true, message: '请输入工时单价!' }], |
| 178 | xueli: [{ required: true, message: '请输入学历!' }], | 178 | xueli: [{ required: true, message: '请输入学历!' }], |
| 179 | - ruTime: [{ required: true, message: '请输入入职日期!' }], | 179 | + // ruTime: [{ required: true, message: '请输入入职日期!' }], |
| 180 | mealAllowancePrice: [{ required: true, message: '请输入餐费津贴标准!' }], | 180 | mealAllowancePrice: [{ required: true, message: '请输入餐费津贴标准!' }], |
| 181 | housePrice: [{ required: true, message: '请输入住房津贴标准!' }], | 181 | housePrice: [{ required: true, message: '请输入住房津贴标准!' }], |
| 182 | guanliPrice: [{ required: true, message: '请输入管理津贴!' }], | 182 | guanliPrice: [{ required: true, message: '请输入管理津贴!' }], |
| 183 | - socialTime: [{ required: true, message: '请输入社保起始日期!' }], | 183 | + // socialTime: [{ required: true, message: '请输入社保起始日期!' }], |
| 184 | notes: [{ required: true, message: '请选择是否在职!' }], | 184 | notes: [{ required: true, message: '请选择是否在职!' }], |
| 185 | - contractTime: [{ required: true, message: '请输入劳动合同周期!' }], | 185 | + // contractTime: [{ required: true, message: '请输入劳动合同周期!' }], |
| 186 | fullAttendanceAward: [{ required: true, message: '请输入全勤奖!' }], | 186 | fullAttendanceAward: [{ required: true, message: '请输入全勤奖!' }], |
| 187 | }, | 187 | }, |
| 188 | url: { | 188 | url: { |
| 1 | +<template> | ||
| 2 | + <a-card :bordered="false"> | ||
| 3 | + <!-- 查询区域 --> | ||
| 4 | + <div class="table-page-search-wrapper"> | ||
| 5 | + <a-form layout="inline" @keyup.enter.native="searchQuery"> | ||
| 6 | + <a-row :gutter="24"> | ||
| 7 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
| 8 | + <a-form-item label="订货单位"> | ||
| 9 | + <j-input placeholder="请输入订货单位" v-model="queryParam.danwei"></j-input> | ||
| 10 | + </a-form-item> | ||
| 11 | + </a-col> | ||
| 12 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
| 13 | + <a-form-item label="工作令"> | ||
| 14 | + <j-input placeholder="请输入工作令" v-model="queryParam.workOrder"></j-input> | ||
| 15 | + </a-form-item> | ||
| 16 | + </a-col> | ||
| 17 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
| 18 | + <a-form-item label="产品类型"> | ||
| 19 | + <j-input placeholder="请输入产品类型" v-model="queryParam.productType"></j-input> | ||
| 20 | + </a-form-item> | ||
| 21 | + </a-col> | ||
| 22 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
| 23 | + <span style="float: right; overflow: hidden" class="table-page-search-submitButtons"> | ||
| 24 | + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | ||
| 25 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | ||
| 26 | + </span> | ||
| 27 | + </a-col> | ||
| 28 | + </a-row> | ||
| 29 | + </a-form> | ||
| 30 | + </div> | ||
| 31 | + <!-- 查询区域-END --> | ||
| 32 | + | ||
| 33 | + <!-- 操作按钮区域 --> | ||
| 34 | + <div class="table-operator"> | ||
| 35 | + <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> --> | ||
| 36 | + <!-- <a-button type="primary" icon="download" @click="handleExportXls('tbl_production_plan')">导出</a-button> --> | ||
| 37 | + <!-- <a-upload | ||
| 38 | + name="file" | ||
| 39 | + :showUploadList="false" | ||
| 40 | + :multiple="false" | ||
| 41 | + :headers="tokenHeader" | ||
| 42 | + :action="importExcelUrl" | ||
| 43 | + @change="handleImportExcel" | ||
| 44 | + > | ||
| 45 | + <a-button type="primary" icon="import">导入</a-button> | ||
| 46 | + </a-upload> --> | ||
| 47 | + <!-- 高级查询区域 --> | ||
| 48 | + <!-- <j-super-query | ||
| 49 | + :fieldList="superFieldList" | ||
| 50 | + ref="superQueryModal" | ||
| 51 | + @handleSuperQuery="handleSuperQuery" | ||
| 52 | + ></j-super-query> --> | ||
| 53 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | ||
| 54 | + <a-menu slot="overlay"> | ||
| 55 | + <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item> | ||
| 56 | + </a-menu> | ||
| 57 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | ||
| 58 | + </a-dropdown> | ||
| 59 | + </div> | ||
| 60 | + | ||
| 61 | + <!-- table区域-begin --> | ||
| 62 | + <div> | ||
| 63 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px"> | ||
| 64 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 | ||
| 65 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a | ||
| 66 | + >项 | ||
| 67 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | ||
| 68 | + </div> | ||
| 69 | + | ||
| 70 | + <a-table | ||
| 71 | + ref="table" | ||
| 72 | + size="middle" | ||
| 73 | + :scroll="{ x: true }" | ||
| 74 | + bordered | ||
| 75 | + rowKey="id" | ||
| 76 | + :columns="columns" | ||
| 77 | + :dataSource="dataSource" | ||
| 78 | + :pagination="ipagination" | ||
| 79 | + :loading="loading" | ||
| 80 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" | ||
| 81 | + class="j-table-force-nowrap" | ||
| 82 | + @change="handleTableChange" | ||
| 83 | + > | ||
| 84 | + <template slot="htmlSlot" slot-scope="text"> | ||
| 85 | + <div v-html="text"></div> | ||
| 86 | + </template> | ||
| 87 | + <template slot="imgSlot" slot-scope="text, record"> | ||
| 88 | + <span v-if="!text" style="font-size: 12px; font-style: italic">无图片</span> | ||
| 89 | + <img | ||
| 90 | + v-else | ||
| 91 | + :src="getImgView(text)" | ||
| 92 | + :preview="record.id" | ||
| 93 | + height="25px" | ||
| 94 | + alt="" | ||
| 95 | + style="max-width: 80px; font-size: 12px; font-style: italic" | ||
| 96 | + /> | ||
| 97 | + </template> | ||
| 98 | + <template slot="fileSlot" slot-scope="text"> | ||
| 99 | + <span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span> | ||
| 100 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> | ||
| 101 | + 下载 | ||
| 102 | + </a-button> | ||
| 103 | + </template> | ||
| 104 | + | ||
| 105 | + <span slot="action" slot-scope="text, record"> | ||
| 106 | + <a @click="handleDetail2(record)">查看</a> | ||
| 107 | + <a-divider type="vertical" /> | ||
| 108 | + <a @click="handleEdit(record)">派工</a> | ||
| 109 | + <a-divider type="vertical" /> | ||
| 110 | + <a @click="handleEdit(record)">验收</a> | ||
| 111 | + </span> | ||
| 112 | + </a-table> | ||
| 113 | + </div> | ||
| 114 | + | ||
| 115 | + <tbl-production-plan-modal ref="modalForm" @ok="modalFormOk"></tbl-production-plan-modal> | ||
| 116 | + </a-card> | ||
| 117 | +</template> | ||
| 118 | + | ||
| 119 | +<script> | ||
| 120 | +import '@/assets/less/TableExpand.less' | ||
| 121 | +import { mixinDevice } from '@/utils/mixin' | ||
| 122 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
| 123 | +import TblProductionPlanModal from './planModules/TblProductionPlanModal' | ||
| 124 | + | ||
| 125 | +export default { | ||
| 126 | + name: 'TblProductionPlanList', | ||
| 127 | + mixins: [JeecgListMixin, mixinDevice], | ||
| 128 | + components: { | ||
| 129 | + TblProductionPlanModal, | ||
| 130 | + }, | ||
| 131 | + data() { | ||
| 132 | + return { | ||
| 133 | + description: 'tbl_production_plan管理页面', | ||
| 134 | + // 表头 | ||
| 135 | + columns: [ | ||
| 136 | + { | ||
| 137 | + title: '序号', | ||
| 138 | + dataIndex: '', | ||
| 139 | + key: 'rowIndex', | ||
| 140 | + width: 60, | ||
| 141 | + align: 'center', | ||
| 142 | + customRender: function (t, r, index) { | ||
| 143 | + return parseInt(index) + 1 | ||
| 144 | + }, | ||
| 145 | + }, | ||
| 146 | + { | ||
| 147 | + title: '订单号', | ||
| 148 | + align: 'center', | ||
| 149 | + dataIndex: 'orderNumber', | ||
| 150 | + }, | ||
| 151 | + { | ||
| 152 | + title: '订货单位', | ||
| 153 | + align: 'center', | ||
| 154 | + dataIndex: 'danwei', | ||
| 155 | + }, | ||
| 156 | + { | ||
| 157 | + title: '工作令', | ||
| 158 | + align: 'center', | ||
| 159 | + dataIndex: 'workOrder', | ||
| 160 | + }, | ||
| 161 | + { | ||
| 162 | + title: '产品名称', | ||
| 163 | + align: 'center', | ||
| 164 | + dataIndex: 'productName', | ||
| 165 | + }, | ||
| 166 | + { | ||
| 167 | + title: '产品类型', | ||
| 168 | + align: 'center', | ||
| 169 | + dataIndex: 'productType', | ||
| 170 | + }, | ||
| 171 | + { | ||
| 172 | + title: '任务下达时间', | ||
| 173 | + align: 'center', | ||
| 174 | + dataIndex: 'workTime', | ||
| 175 | + customRender: function (text) { | ||
| 176 | + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text | ||
| 177 | + }, | ||
| 178 | + }, | ||
| 179 | + { | ||
| 180 | + title: '派工时间', | ||
| 181 | + align: 'center', | ||
| 182 | + dataIndex: 'dispatchTime', | ||
| 183 | + customRender: function (text) { | ||
| 184 | + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text | ||
| 185 | + }, | ||
| 186 | + }, | ||
| 187 | + { | ||
| 188 | + title: '交货时间', | ||
| 189 | + align: 'center', | ||
| 190 | + dataIndex: 'deliveryTime', | ||
| 191 | + customRender: function (text) { | ||
| 192 | + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text | ||
| 193 | + }, | ||
| 194 | + }, | ||
| 195 | + { | ||
| 196 | + title: '数量(套)', | ||
| 197 | + align: 'center', | ||
| 198 | + dataIndex: 'num', | ||
| 199 | + }, | ||
| 200 | + { | ||
| 201 | + title: '总工时', | ||
| 202 | + align: 'center', | ||
| 203 | + dataIndex: 'totalWork', | ||
| 204 | + }, | ||
| 205 | + { | ||
| 206 | + title: '已派发工时', | ||
| 207 | + align: 'center', | ||
| 208 | + dataIndex: 'pai', | ||
| 209 | + }, | ||
| 210 | + { | ||
| 211 | + title: '操作', | ||
| 212 | + dataIndex: 'action', | ||
| 213 | + align: 'center', | ||
| 214 | + fixed: 'right', | ||
| 215 | + width: 147, | ||
| 216 | + scopedSlots: { customRender: 'action' }, | ||
| 217 | + }, | ||
| 218 | + ], | ||
| 219 | + url: { | ||
| 220 | + list: '/production/tblProductionPlan/list', | ||
| 221 | + delete: '/production/tblProductionPlan/delete', | ||
| 222 | + deleteBatch: '/production/tblProductionPlan/deleteBatch', | ||
| 223 | + exportXlsUrl: '/production/tblProductionPlan/exportXls', | ||
| 224 | + importExcelUrl: 'production/tblProductionPlan/importExcel', | ||
| 225 | + }, | ||
| 226 | + dictOptions: {}, | ||
| 227 | + superFieldList: [], | ||
| 228 | + } | ||
| 229 | + }, | ||
| 230 | + created() { | ||
| 231 | + this.getSuperFieldList() | ||
| 232 | + }, | ||
| 233 | + computed: { | ||
| 234 | + importExcelUrl: function () { | ||
| 235 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
| 236 | + }, | ||
| 237 | + }, | ||
| 238 | + methods: { | ||
| 239 | + initDictConfig() {}, | ||
| 240 | + getSuperFieldList() { | ||
| 241 | + let fieldList = [] | ||
| 242 | + fieldList.push({ type: 'string', value: 'orderNumber', text: '订单号' }) | ||
| 243 | + fieldList.push({ type: 'string', value: 'workOrder', text: '工作令' }) | ||
| 244 | + fieldList.push({ type: 'string', value: 'productName', text: '产品名称' }) | ||
| 245 | + fieldList.push({ type: 'string', value: 'productType', text: '产品类型' }) | ||
| 246 | + fieldList.push({ type: 'date', value: 'workTime', text: '任务下达时间' }) | ||
| 247 | + fieldList.push({ type: 'date', value: 'dispatchTime', text: '派工时间' }) | ||
| 248 | + fieldList.push({ type: 'date', value: 'deliveryTime', text: '交货时间' }) | ||
| 249 | + fieldList.push({ type: 'string', value: 'num', text: '数量(套)' }) | ||
| 250 | + fieldList.push({ type: 'string', value: 'totalWork', text: '总工时' }) | ||
| 251 | + fieldList.push({ type: 'string', value: 'pai', text: '已派发工时' }) | ||
| 252 | + this.superFieldList = fieldList | ||
| 253 | + }, | ||
| 254 | + }, | ||
| 255 | +} | ||
| 256 | +</script> | ||
| 257 | +<style scoped> | ||
| 258 | +@import '~@assets/less/common.less'; | ||
| 259 | +</style> |
| 1 | +<template> | ||
| 2 | + <a-spin :spinning="confirmLoading"> | ||
| 3 | + <j-form-container :disabled="formDisabled"> | ||
| 4 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | ||
| 5 | + <div class="align-colon"> | ||
| 6 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>订单号:</span><a-input v-model="model.orderNumber" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 7 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>订货单位:</span><a-input v-model="model.danwei" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 8 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>工作令:</span><a-input v-model="model.workOrder" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 9 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>产品名称:</span><a-input v-model="model.productName" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 10 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>产品类型:</span><a-input v-model="model.productType" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 11 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>任务下达时间:</span><a-input v-model="model.workTime" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 12 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>派工时间:</span><a-input v-model="model.dispatchTime" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 13 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>交货时间:</span><a-input v-model="model.deliveryTime" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 14 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>数量(套):</span><a-input v-model="model.num" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 15 | + <p style="margin-bottom: 0px;margin-left: 50px;"><span>总工时:</span><a-input v-model="model.totalWork" style="width: 200px;border:0px;font-weight: bold;"></a-input></p> | ||
| 16 | + <p style="margin-left: 50px;"><span>已派发工时:</span><a-input v-model="model.pai" style="width: 200px;border:0px"></a-input></p> | ||
| 17 | + <!-- 图片容器 --> | ||
| 18 | + <div class="image-container-wrapper"> | ||
| 19 | + <div class="image-container"> | ||
| 20 | + <j-image-upload isMultiple v-model="files" class="custom-image"></j-image-upload> | ||
| 21 | + | ||
| 22 | + </div> | ||
| 23 | + <div class="image-container"> | ||
| 24 | + <j-image-upload isMultiple v-model="imageSrc"></j-image-upload> | ||
| 25 | + </div> | ||
| 26 | + </div> | ||
| 27 | + </div> | ||
| 28 | + <a-table :columns="columns" :data-source="res" style="width: auto" :pagination="false"></a-table> | ||
| 29 | + </a-form-model> | ||
| 30 | + </j-form-container> | ||
| 31 | + </a-spin> | ||
| 32 | +</template> | ||
| 33 | + | ||
| 34 | +<script> | ||
| 35 | +import { httpAction, getAction } from '@/api/manage' | ||
| 36 | +import { validateDuplicateValue } from '@/utils/util' | ||
| 37 | +import Axios from 'axios' | ||
| 38 | +import { queryBynumber, querygx } from '../../../api/manage' | ||
| 39 | + | ||
| 40 | +export default { | ||
| 41 | + name: 'TblProductionPlanForm', | ||
| 42 | + components: {}, | ||
| 43 | + props: { | ||
| 44 | + //表单禁用 | ||
| 45 | + disabled: { | ||
| 46 | + type: Boolean, | ||
| 47 | + default: false, | ||
| 48 | + required: false, | ||
| 49 | + }, | ||
| 50 | + }, | ||
| 51 | + data() { | ||
| 52 | + return { | ||
| 53 | + imageSrc: '', | ||
| 54 | + files: '', | ||
| 55 | + model: {}, | ||
| 56 | + res:[], | ||
| 57 | + columns: [ | ||
| 58 | + { | ||
| 59 | + title: '工序', | ||
| 60 | + align: 'center', | ||
| 61 | + dataIndex: 'workingProcedure', | ||
| 62 | + }, | ||
| 63 | + { | ||
| 64 | + title: '承接人', | ||
| 65 | + align: 'center', | ||
| 66 | + dataIndex: 'undertaker', | ||
| 67 | + }, | ||
| 68 | + { | ||
| 69 | + title: '工时', | ||
| 70 | + align: 'center', | ||
| 71 | + dataIndex: 'workHours', | ||
| 72 | + }, | ||
| 73 | + | ||
| 74 | + { | ||
| 75 | + title: '派发时间', | ||
| 76 | + align: 'center', | ||
| 77 | + dataIndex: 'dispatchTime', | ||
| 78 | + customRender: function (text) { | ||
| 79 | + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text | ||
| 80 | + }, | ||
| 81 | + }, | ||
| 82 | + { | ||
| 83 | + title: '派发人', | ||
| 84 | + align: 'center', | ||
| 85 | + dataIndex: 'dispatchRen', | ||
| 86 | + }, | ||
| 87 | + { | ||
| 88 | + title: '验收时间', | ||
| 89 | + align: 'center', | ||
| 90 | + dataIndex: 'yanTime', | ||
| 91 | + customRender: function (text) { | ||
| 92 | + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text | ||
| 93 | + }, | ||
| 94 | + }, | ||
| 95 | + { | ||
| 96 | + title: '验收人', | ||
| 97 | + align: 'center', | ||
| 98 | + dataIndex: 'yanRen', | ||
| 99 | + }, | ||
| 100 | + { | ||
| 101 | + title: '验收结果', | ||
| 102 | + align: 'center', | ||
| 103 | + dataIndex: 'yanResult', | ||
| 104 | + }, | ||
| 105 | + { | ||
| 106 | + title: '备注', | ||
| 107 | + align: 'center', | ||
| 108 | + dataIndex: 'notes', | ||
| 109 | + }, | ||
| 110 | + ], | ||
| 111 | + labelCol: { | ||
| 112 | + xs: { span: 24 }, | ||
| 113 | + sm: { span: 5 }, | ||
| 114 | + }, | ||
| 115 | + wrapperCol: { | ||
| 116 | + xs: { span: 24 }, | ||
| 117 | + sm: { span: 16 }, | ||
| 118 | + }, | ||
| 119 | + confirmLoading: false, | ||
| 120 | + validatorRules: { | ||
| 121 | + pai: [{ required: true, message: '请输入已派发工时!' }], | ||
| 122 | + totalWork: [{ required: true, message: '请输入总工时!' }], | ||
| 123 | + deliveryTime: [{ required: true, message: '请输入交货时间!' }], | ||
| 124 | + dispatchTime: [{ required: true, message: '请输入派工时间!' }], | ||
| 125 | + workTime: [{ required: true, message: '请输入任务下达时间!' }], | ||
| 126 | + productType: [{ required: true, message: '请输入产品类型!' }], | ||
| 127 | + productName: [{ required: true, message: '请输入产品名称!' }], | ||
| 128 | + workOrder: [{ required: true, message: '请输入工作令!' }], | ||
| 129 | + danwei: [{ required: true, message: '请输入订货单位!' }], | ||
| 130 | + orderNumber: [{ required: true, message: '请输入订单号!' }], | ||
| 131 | + num: [{ required: true, message: '请输入数量(套)!' }], | ||
| 132 | + }, | ||
| 133 | + url: { | ||
| 134 | + add: '/production/tblProductionPlan/add', | ||
| 135 | + edit: '/production/tblProductionPlan/edit', | ||
| 136 | + queryById: '/production/tblProductionPlan/queryById', | ||
| 137 | + queryBynumber: '/production/tblProductionPlan/queryBynumber', | ||
| 138 | + querygx: '/production/tblProductionPlan/querygx', | ||
| 139 | + }, | ||
| 140 | + } | ||
| 141 | + }, | ||
| 142 | + computed: { | ||
| 143 | + formDisabled() { | ||
| 144 | + return this.disabled | ||
| 145 | + }, | ||
| 146 | + }, | ||
| 147 | + created() { | ||
| 148 | + //备份model原始值 | ||
| 149 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)) | ||
| 150 | + | ||
| 151 | + }, | ||
| 152 | + methods: { | ||
| 153 | + querygx(orderNumber,productType) { | ||
| 154 | + querygx(this.url.querygx, this.model).then((res) => { | ||
| 155 | + console.log('工序订单号:', orderNumber) | ||
| 156 | + console.log('工序产品类型:', productType) | ||
| 157 | + console.log("工序查询:",res) | ||
| 158 | + this.res=res.result | ||
| 159 | + }) | ||
| 160 | + }, | ||
| 161 | + queryBynumber(orderNumber) { | ||
| 162 | + console.log('1订单号:', orderNumber) | ||
| 163 | + queryBynumber(this.url.queryBynumber, this.model).then((res) => { | ||
| 164 | + console.log(res.result) | ||
| 165 | + this.imageSrc = res.result.pics | ||
| 166 | + this.files = res.result.files | ||
| 167 | + console.log('files:', this.files) | ||
| 168 | + console.log(this.imageSrc) | ||
| 169 | + }) | ||
| 170 | + }, | ||
| 171 | + add() { | ||
| 172 | + this.edit(this.modelDefault) | ||
| 173 | + }, | ||
| 174 | + edit(record) { | ||
| 175 | + this.model = Object.assign({}, record) | ||
| 176 | + this.visible = true | ||
| 177 | + }, | ||
| 178 | + submitForm() { | ||
| 179 | + const that = this | ||
| 180 | + // 触发表单验证 | ||
| 181 | + this.$refs.form.validate((valid) => { | ||
| 182 | + if (valid) { | ||
| 183 | + that.confirmLoading = true | ||
| 184 | + let httpurl = '' | ||
| 185 | + let method = '' | ||
| 186 | + if (!this.model.id) { | ||
| 187 | + httpurl += this.url.add | ||
| 188 | + method = 'post' | ||
| 189 | + } else { | ||
| 190 | + httpurl += this.url.edit | ||
| 191 | + method = 'put' | ||
| 192 | + } | ||
| 193 | + httpAction(httpurl, this.model, method) | ||
| 194 | + .then((res) => { | ||
| 195 | + if (res.success) { | ||
| 196 | + that.$message.success(res.message) | ||
| 197 | + that.$emit('ok') | ||
| 198 | + } else { | ||
| 199 | + that.$message.warning(res.message) | ||
| 200 | + } | ||
| 201 | + }) | ||
| 202 | + .finally(() => { | ||
| 203 | + that.confirmLoading = false | ||
| 204 | + }) | ||
| 205 | + } | ||
| 206 | + }) | ||
| 207 | + }, | ||
| 208 | + }, | ||
| 209 | +} | ||
| 210 | +</script> | ||
| 211 | + | ||
| 212 | +<style scoped> | ||
| 213 | +.align-colon p { | ||
| 214 | + display: flex; | ||
| 215 | + align-items: center; | ||
| 216 | +} | ||
| 217 | + | ||
| 218 | +.align-colon p span { | ||
| 219 | + width: 100px; /* 固定文本部分的宽度 */ | ||
| 220 | + text-align: right; /* 文本右对齐 */ | ||
| 221 | + margin-right: -0px; /* 调整冒号后的空白间距 */ | ||
| 222 | + font-weight: bold; /* 将文本加粗 */ | ||
| 223 | +} | ||
| 224 | +/* 图片容器及其包裹器的样式 */ | ||
| 225 | +.image-container-wrapper { | ||
| 226 | + width: 50%; /* 将图片容器包裹器宽度设置为一半 */ | ||
| 227 | + float: right; /* 右浮动 */ | ||
| 228 | + margin-top: -300px; /* 调整顶部外边距以与其他内容对齐 */ | ||
| 229 | +} | ||
| 230 | + | ||
| 231 | +.image-container { | ||
| 232 | + margin-bottom: -10px; /* 图片容器下边距 */ | ||
| 233 | +} | ||
| 234 | +.custom-image { | ||
| 235 | + width: 500px; /* 设置图片宽度为200像素 */ | ||
| 236 | + height: auto; /* 自动调整高度以保持宽高比 */ | ||
| 237 | +} | ||
| 238 | +</style> |
| 1 | +<template> | ||
| 2 | + <a-drawer | ||
| 3 | + :title="title" | ||
| 4 | + :width="width" | ||
| 5 | + placement="right" | ||
| 6 | + :closable="false" | ||
| 7 | + @close="close" | ||
| 8 | + destroyOnClose | ||
| 9 | + :visible="visible"> | ||
| 10 | + <tbl-production-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-production-plan-form> | ||
| 11 | + <div class="drawer-footer"> | ||
| 12 | + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | ||
| 13 | + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | ||
| 14 | + </div> | ||
| 15 | + </a-drawer> | ||
| 16 | +</template> | ||
| 17 | + | ||
| 18 | +<script> | ||
| 19 | + | ||
| 20 | + import TblProductionPlanForm from './TblProductionPlanForm' | ||
| 21 | + | ||
| 22 | + export default { | ||
| 23 | + name: 'TblProductionPlanModal', | ||
| 24 | + components: { | ||
| 25 | + TblProductionPlanForm | ||
| 26 | + }, | ||
| 27 | + data () { | ||
| 28 | + return { | ||
| 29 | + title:"操作", | ||
| 30 | + width:800, | ||
| 31 | + visible: false, | ||
| 32 | + disableSubmit: false | ||
| 33 | + } | ||
| 34 | + }, | ||
| 35 | + methods: { | ||
| 36 | + add () { | ||
| 37 | + this.visible=true | ||
| 38 | + this.$nextTick(()=>{ | ||
| 39 | + this.$refs.realForm.add(); | ||
| 40 | + }) | ||
| 41 | + }, | ||
| 42 | + edit (record) { | ||
| 43 | + this.visible=true | ||
| 44 | + this.$nextTick(()=>{ | ||
| 45 | + this.$refs.realForm.edit(record); | ||
| 46 | + }); | ||
| 47 | + }, | ||
| 48 | + close () { | ||
| 49 | + this.$emit('close'); | ||
| 50 | + this.visible = false; | ||
| 51 | + }, | ||
| 52 | + submitCallback(){ | ||
| 53 | + this.$emit('ok'); | ||
| 54 | + this.visible = false; | ||
| 55 | + }, | ||
| 56 | + handleOk () { | ||
| 57 | + this.$refs.realForm.submitForm(); | ||
| 58 | + }, | ||
| 59 | + handleCancel () { | ||
| 60 | + this.close() | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | +</script> | ||
| 65 | + | ||
| 66 | +<style lang="less" scoped> | ||
| 67 | +/** Button按钮间距 */ | ||
| 68 | + .ant-btn { | ||
| 69 | + margin-left: 30px; | ||
| 70 | + margin-bottom: 30px; | ||
| 71 | + float: right; | ||
| 72 | + } | ||
| 73 | + .drawer-footer{ | ||
| 74 | + position: absolute; | ||
| 75 | + bottom: -8px; | ||
| 76 | + width: 100%; | ||
| 77 | + border-top: 1px solid #e8e8e8; | ||
| 78 | + padding: 10px 16px; | ||
| 79 | + text-align: right; | ||
| 80 | + left: 0; | ||
| 81 | + background: #fff; | ||
| 82 | + border-radius: 0 0 2px 2px; | ||
| 83 | + } | ||
| 84 | +</style> |
| 1 | +<template> | ||
| 2 | + <j-modal | ||
| 3 | + :title="title" | ||
| 4 | + :width="width" | ||
| 5 | + :visible="visible" | ||
| 6 | + switchFullscreen | ||
| 7 | + @ok="handleOk" | ||
| 8 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | ||
| 9 | + @cancel="handleCancel" | ||
| 10 | + cancelText="关闭"> | ||
| 11 | + <tbl-production-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-production-plan-form> | ||
| 12 | + </j-modal> | ||
| 13 | +</template> | ||
| 14 | + | ||
| 15 | +<script> | ||
| 16 | + | ||
| 17 | + import TblProductionPlanForm from './TblProductionPlanForm' | ||
| 18 | + export default { | ||
| 19 | + name: 'TblProductionPlanModal', | ||
| 20 | + components: { | ||
| 21 | + TblProductionPlanForm | ||
| 22 | + }, | ||
| 23 | + data () { | ||
| 24 | + return { | ||
| 25 | + title:'', | ||
| 26 | + width:1200, | ||
| 27 | + visible: false, | ||
| 28 | + disableSubmit: false | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + methods: { | ||
| 32 | + add () { | ||
| 33 | + this.visible=true | ||
| 34 | + this.$nextTick(()=>{ | ||
| 35 | + this.$refs.realForm.add(); | ||
| 36 | + }) | ||
| 37 | + }, | ||
| 38 | + queryBynumber(orderNumber){ | ||
| 39 | + this.visible=true | ||
| 40 | + this.$nextTick(()=>{ | ||
| 41 | + this.$refs.realForm.queryBynumber(orderNumber); | ||
| 42 | + }) | ||
| 43 | + }, | ||
| 44 | + querygx(orderNumber,productType){ | ||
| 45 | + this.visible=true | ||
| 46 | + this.$nextTick(()=>{ | ||
| 47 | + this.$refs.realForm.querygx(orderNumber,productType) | ||
| 48 | + }) | ||
| 49 | + }, | ||
| 50 | + edit (record) { | ||
| 51 | + this.visible=true | ||
| 52 | + this.$nextTick(()=>{ | ||
| 53 | + this.$refs.realForm.edit(record); | ||
| 54 | + }) | ||
| 55 | + }, | ||
| 56 | + close () { | ||
| 57 | + this.$emit('close'); | ||
| 58 | + this.visible = false; | ||
| 59 | + }, | ||
| 60 | + handleOk () { | ||
| 61 | + this.$refs.realForm.submitForm(); | ||
| 62 | + }, | ||
| 63 | + submitCallback(){ | ||
| 64 | + this.$emit('ok'); | ||
| 65 | + this.visible = false; | ||
| 66 | + }, | ||
| 67 | + handleCancel () { | ||
| 68 | + this.close() | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + } | ||
| 72 | +</script> |
-
请 注册 或 登录 后发表评论