采购入库、采购退货弹窗详情修改;库存报表页增加详情弹窗
| | |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @cell-click="cellClickEvent" |
| | | @cell-dblclick="cellClickEvent" |
| | | > |
| | | |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | <!-- 详情框 部分1--> |
| | | <vxe-modal v-model="showDetails" title="查看详情" width="600" height="80%" :mask="false" :lock-view="false" resize> |
| | | <el-container > |
| | | <!-- <el-header height="35px" |
| | | style="margin: 0;padding: 0"> |
| | | 这是头 |
| | | </el-header>--> |
| | | <el-header height="35px" |
| | | style="margin: 0;padding: 0"> |
| | | |
| | | <el-input v-model="showCGDH" placeholder="采购单号" disabled > |
| | | <template #prepend>采购单号:</template> |
| | | </el-input> |
| | | </el-header> |
| | | <el-main> |
| | | <template #default> |
| | | <vxe-table |
| | | border="inner" |
| | | border="default" |
| | | auto-resize |
| | | show-overflow |
| | | max-height="420" |
| | | max-height="400" |
| | | :row-config="{isHover: true}" |
| | | :show-header="false" |
| | | :sync-resize="showDetails" |
| | | :data="detailData"> |
| | | :data="detailData" |
| | | |
| | | > |
| | | <vxe-column field="label" width="30%" class-name="v-column-label"></vxe-column> |
| | | <vxe-column field="value"></vxe-column> |
| | | </vxe-table> |
| | |
| | | </el-container> |
| | | </vxe-modal> |
| | | <!-- 详情框 部分1 结束--> |
| | | |
| | | |
| | | |
| | | </el-main> |
| | | </el-container> |
| | | </template> |
| | |
| | | |
| | | }) |
| | | |
| | | |
| | | //详情框 部分2 |
| | | const showCGDH =ref(); |
| | | const showDetails =ref(false); |
| | | let detailData =[]; |
| | | const cellClickEvent = ({row}) => { |
| | | detailData = ['cgdh', 'thdh', 'h', 'xh', 'wlbh', 'wlmc', 'gys','w','g','dw','cgzt','rq','yl','sl','xsdh','je','6'].map(field => { |
| | | return { label: ModelColumnContent(field) , value: row[field] } |
| | | |
| | | }) |
| | | showDetails.value = true; |
| | | showCGDH.value = row['cgdh']; |
| | | } |
| | | |
| | | const ModelColumnContent = (text) => { |
| | |
| | | <style scoped> |
| | | :deep(.v-column-label div span){ |
| | | font-weight: bold; |
| | | font-align:center; |
| | | } |
| | | </style> |
| | |
| | | /> |
| | | |
| | | </el-col> |
| | | |
| | | <el-col :span="2"> |
| | | <el-button |
| | | id="select" |
| | |
| | | <!-- 详情框 部分1--> |
| | | <vxe-modal v-model="showDetails" title="查看详情" width="600" height="80%" :mask="false" :lock-view="false" resize> |
| | | <el-container > |
| | | <!-- <el-header height="35px" |
| | | <el-header height="35px" |
| | | style="margin: 0;padding: 0"> |
| | | 这是头 |
| | | </el-header>--> |
| | | |
| | | <el-input v-model="showCGDH" placeholder="采购单号" disabled > |
| | | <template #prepend>采购单号:</template> |
| | | </el-input> |
| | | </el-header> |
| | | <el-main> |
| | | <template #default> |
| | | <vxe-table |
| | |
| | | |
| | | }) |
| | | |
| | | |
| | | const showCGDH = ref(); |
| | | |
| | | //详情框 部分2 |
| | | const showDetails =ref(false); |
| | |
| | | detailData = ['cgdh', 'rkdh', 'h', 'xh', 'wlbh', 'wlmc', 'gys','w','g','dw','cgzt','rq','yl','sl','xsdh','je','6'].map(field => { |
| | | return { label: ModelColumnContent(field) , value: row[field] } |
| | | }) |
| | | |
| | | showDetails.value = true; |
| | | showCGDH.value = row['cgdh']; |
| | | } |
| | | |
| | | const ModelColumnContent = (text) => { |
| | |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @cell-dblclick="cellClickEvent" |
| | | > |
| | | |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | </div> |
| | | </template> |
| | | </vxe-grid> |
| | | |
| | | <!-- 详情框 部分1--> |
| | | <vxe-modal v-model="showDetails" title="查看详情" width="600" height="80%" :mask="false" :lock-view="false" resize> |
| | | <el-container > |
| | | <el-header height="35px" |
| | | style="margin: 0;padding: 0"> |
| | | |
| | | <el-input v-model="showNum" placeholder="采购单号" disabled > |
| | | <template #prepend>物料编码</template> |
| | | </el-input> |
| | | </el-header> |
| | | <el-main> |
| | | <template #default> |
| | | <vxe-table |
| | | border="default" |
| | | auto-resize |
| | | show-overflow |
| | | max-height="400" |
| | | :row-config="{isHover: true}" |
| | | :show-header="false" |
| | | :sync-resize="showDetails" |
| | | :data="detailData" |
| | | > |
| | | <vxe-column field="label" width="30%" class-name="v-column-label"></vxe-column> |
| | | <vxe-column field="value"></vxe-column> |
| | | </vxe-table> |
| | | </template> |
| | | </el-main> |
| | | <el-footer height="40px"> |
| | | <!-- <el-row> |
| | | <el-col :offset="20" :span="4"> |
| | | <el-button |
| | | id="Sure" |
| | | type="primary" |
| | | @click="SureReturn" |
| | | >确认退货 |
| | | </el-button> |
| | | </el-col> |
| | | |
| | | </el-row>--> |
| | | </el-footer> |
| | | </el-container> |
| | | </vxe-modal> |
| | | <!-- 详情框 部分1 结束--> |
| | | |
| | | </el-main> |
| | | </div> |
| | | </template> |
| | |
| | | /* {title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},*/ |
| | | {type: 'seq', fixed: "left", title: ' ', width: 50}, |
| | | /*{ type: 'checkbox',fixed:"left", title: '', width: 50 },*/ |
| | | |
| | | {field: 'kczz', width: '13%', title: '库存组织', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: 'wlbm', width: '10%', title: '物料编码', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: 'wlmc', width: '10%',title: '物料名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | |
| | | }, |
| | | }) |
| | | |
| | | |
| | | //列表操作 |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' : { |
| | |
| | | //VXETable.modal.message( '请选择一条数据!') |
| | | return |
| | | } else { |
| | | /* async ()=>{ |
| | | const type = await.VXETable.modal.confirm('您选择了'+$grid.getCheckboxRecords().length+'条数据!,是否确认退库?'); |
| | | }*/ |
| | | const type = VXETable.modal.confirm('您选择了' + $grid.getCheckboxRecords().length + '条数据!,是否确认退库?'); |
| | | |
| | | |
| | | /* if(VXETable.modal.confirm('您选择了'+$grid.getCheckboxRecords().length+'条数据!,是否确认退库?' )){ |
| | | //openAlert({type:'message', content: '成功退库'+$grid.getCheckboxRecords().length+'条数据!', status: 'success',lockView: false, mask: false }) |
| | | |
| | | |
| | | }*/ |
| | | |
| | | /* if(type==='confirm'){ |
| | | openAlert({type:'message', content: '成功退库'+$grid.getCheckboxRecords().length+'条数据!', status: 'success' }) |
| | | } |
| | | |
| | | */ |
| | | //openAlert({type:'alert', content: '成功退库'+$grid.getCheckboxRecords().length+'条数据!', status: 'success' }) |
| | | //VXETable.modal.message( '请选择一条数据!') |
| | | return |
| | | } |
| | | break |
| | |
| | | }, |
| | | } |
| | | |
| | | |
| | | const showNum =ref(); |
| | | const showDetails =ref(false); |
| | | let detailData =[]; |
| | | |
| | | const cellClickEvent = ({row}) => { |
| | | detailData = cName.map(field => { |
| | | return { label: ModelColumnContent(field) , value: row[field] } |
| | | |
| | | }) |
| | | |
| | | |
| | | showDetails.value = true; |
| | | showNum.value = row['wlbm']; |
| | | |
| | | } |
| | | const cName = ['kczz','wlbm','wlmc','cd','kcbh','w','g','h','zdw','aqkc','kcs','kykc','wlsl','zmj', 'dpmj','scrq','bzq','kq','kw','jykc','bz']; |
| | | const ModelColumnContent = (text) => { |
| | | switch (text) { |
| | | case 'kczz': |
| | | return "库存组织"; |
| | | case 'wlbm': |
| | | return "物料编码"; |
| | | case 'wlmc': |
| | | return "物料名称"; |
| | | case 'cd': |
| | | return "产地"; |
| | | case 'kcbh': |
| | | return "库存编号"; |
| | | case 'w': |
| | | return "宽"; |
| | | case 'g': |
| | | return "高"; |
| | | case 'h': |
| | | return "厚"; |
| | | case 'zdw': |
| | | return "主单位"; |
| | | case 'aqkc': |
| | | return "安全库存"; |
| | | case 'kcs': |
| | | return "库存数"; |
| | | case 'kykc': |
| | | return "可用库存"; |
| | | case 'wlsl': |
| | | return "未领数量"; |
| | | case 'zmj': |
| | | return "总面积"; |
| | | case 'dpmj': |
| | | return "单片面积"; |
| | | case 'scrq': |
| | | return "生产日期"; |
| | | case 'bzq': return "保质期"; |
| | | case 'kq': return "库区"; |
| | | case 'kw': return "库位"; |
| | | case 'jykc': return "积压库存"; |
| | | case 'bz': |
| | | return "备注"; |
| | | default: |
| | | return text; |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | const openAlert = (options) => { |
| | | if(options.type==='message'){ |
| | | VXETable.modal.message(options) |