| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.ints.entity.WaitMatin; |
| | | import com.zy.ints.entity.WaitMatout; |
| | | import com.zy.ints.service.WaitMatoutService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class WaitMatoutController extends BaseController { |
| | |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(waitMatoutService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/waitMatout/head/page/auth") |
| | | @ManagerAuth |
| | | public R headPage(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | if (!Cools.isEmpty(param.get("appe_time"))){ |
| | | String val = String.valueOf(param.get("appe_time")); |
| | | if (val.contains(RANGE_TIME_LINK)) { |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | param.put("startTime", DateUtils.convert(dates[0])); |
| | | param.put("endTime", DateUtils.convert(dates[1])); |
| | | param.remove("appe_time"); |
| | | } |
| | | } |
| | | return R.ok(waitMatoutService.getHeadPage(toPage(curr, limit, param, WaitMatout.class))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitMatout/list/auth") |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(WaitMatout.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(waitMatoutService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitMatout/list/auth2") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam(name = "billNo") String bill_no){ |
| | | EntityWrapper<WaitMatout> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("bill_no", bill_no); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(waitMatoutService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | |
| | | @RequestMapping(value = "/waitMatout/add/auth") |
| | | @ManagerAuth |
| | | public R add(WaitMatout waitMatout) { |
| | | waitMatoutService.insert(waitMatout); |
| | | return R.ok(); |
| | | @Transactional |
| | | public R add(@RequestBody List<WaitMatout> waitMatouts) { |
| | | if (Cools.isEmpty(waitMatouts)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | if (waitMatoutService.selectCount(new EntityWrapper<WaitMatout>().eq("bill_no", waitMatouts.get(0).getBillNo())) > 0) { |
| | | return R.error("单据编号已存在"); |
| | | } |
| | | int i = 1; |
| | | Date now = new Date(); |
| | | for (WaitMatout waitMatout : waitMatouts) { |
| | | waitMatout.setSeqNo(i); |
| | | waitMatout.setAppeTime(now); |
| | | waitMatout.setAppeUser(getUserId()); |
| | | waitMatout.setModiTime(now); |
| | | waitMatout.setModiUser(getUserId()); |
| | | if (!waitMatoutService.insert(waitMatout)) { |
| | | throw new CoolException("添加单据明细失败"); |
| | | } |
| | | i++; |
| | | } |
| | | return R.ok("添加成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitMatout/update/auth") |
| | | @ManagerAuth |
| | | public R update(WaitMatout waitMatout){ |
| | | if (Cools.isEmpty(waitMatout) || null==waitMatout.getSeqNo()){ |
| | | @RequestMapping(value = "/waitMatout/modify/auth") |
| | | @ManagerAuth |
| | | @Transactional |
| | | public R update(@RequestBody List<WaitMatout> waitMatouts){ |
| | | if (Cools.isEmpty(waitMatouts)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | Date now = new Date(); |
| | | List<WaitMatout> oldWaitMatouts = waitMatoutService.selectList(new EntityWrapper<WaitMatout>().eq("bill_no", waitMatouts.get(0).getBillNo())); |
| | | Date appeTime = oldWaitMatouts!=null?oldWaitMatouts.get(0).getAppeTime():now; |
| | | Long appeUser = oldWaitMatouts!=null?oldWaitMatouts.get(0).getAppeUser():getUserId(); |
| | | if (!waitMatoutService.delete(new EntityWrapper<WaitMatout>().eq("bill_no", waitMatouts.get(0).getBillNo()))) { |
| | | return R.error(); |
| | | } |
| | | waitMatoutService.updateById(waitMatout); |
| | | return R.ok(); |
| | | int i = 1; |
| | | for (WaitMatout waitMatout : waitMatouts) { |
| | | waitMatout.setSeqNo(i); |
| | | waitMatout.setAppeTime(appeTime); |
| | | waitMatout.setAppeUser(appeUser); |
| | | waitMatout.setModiTime(now); |
| | | waitMatout.setModiUser(getUserId()); |
| | | if (!waitMatoutService.insert(waitMatout)) { |
| | | throw new CoolException("修改单据明细失败"); |
| | | } |
| | | i++; |
| | | } |
| | | return R.ok("修改成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitMatout/detl/list/auth") |
| | | @ManagerAuth |
| | | public R detlPage(@RequestParam String billNo){ |
| | | if (Cools.isEmpty(billNo)){ |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | List<WaitMatout> waitMatins = waitMatoutService.selectList(new EntityWrapper<WaitMatout>().eq("bill_no", billNo)); |
| | | if (Cools.isEmpty(waitMatins)) { |
| | | return R.parse(BaseRes.EMPTY); |
| | | } |
| | | return R.ok().add(waitMatins); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/waitMatout/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | waitMatoutService.deleteById(id); |
| | | public R delete(@RequestParam String billNo){ |
| | | if (!waitMatoutService.delete(new EntityWrapper<WaitMatout>().eq("bill_no", billNo))) { |
| | | throw new CoolException("删除单据明细失败"); |
| | | } |
| | | return R.ok(); |
| | | return R.ok("删除成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitMatout/export/auth") |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WaitMatoutMapper extends BaseMapper<WaitMatout> { |
| | | |
| | | List<WaitMatout> getHeadPage(Map<String, Object> condition); |
| | | |
| | | Integer getHeadPageCount(Map<String, Object> condition); |
| | | } |
| | |
| | | package com.zy.ints.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.zy.ints.entity.WaitMatin; |
| | | import com.zy.ints.entity.WaitMatout; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface WaitMatoutService extends IService<WaitMatout> { |
| | | |
| | | Page<WaitMatout> getHeadPage(Page<WaitMatout> toPage); |
| | | } |
| | |
| | | package com.zy.ints.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.zy.ints.entity.WaitMatin; |
| | | import com.zy.ints.mapper.WaitMatoutMapper; |
| | | import com.zy.ints.entity.WaitMatout; |
| | | import com.zy.ints.service.WaitMatoutService; |
| | |
| | | @Service("waitMatoutService") |
| | | public class WaitMatoutServiceImpl extends ServiceImpl<WaitMatoutMapper, WaitMatout> implements WaitMatoutService { |
| | | |
| | | @Override |
| | | public Page<WaitMatout> getHeadPage(Page<WaitMatout> page) { |
| | | |
| | | page.setRecords(baseMapper.getHeadPage(page.getCondition())); |
| | | page.setTotal(baseMapper.getHeadPageCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | } |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="condition"> |
| | | <if test="bill_no!=null and bill_no!='' "> |
| | | and bill_no like '%' + #{bill_no} + '%' |
| | | </if> |
| | | <if test="bill_type!=null and bill_type!='' "> |
| | | and bill_type like '%' + #{bill_type} + '%' |
| | | </if> |
| | | <if test="mat_name!=null and mat_name!='' "> |
| | | and a.mat_name like '%' + #{mat_name} + '%' |
| | | </if> |
| | | <if test="qty!=null and qty!='' "> |
| | | and a.qty = #{qty} |
| | | </if> |
| | | <if test="altme!=null and altme!='' "> |
| | | and a.unit like '%' + #{unit} + '%' |
| | | </if> |
| | | <if test="startTime!=null and endTime!=null"> |
| | | and appe_time between #{startTime} and #{endTime} |
| | | </if> |
| | | </sql> |
| | | |
| | | |
| | | <select id="getHeadPage" resultMap="BaseResultMap"> |
| | | select * from |
| | | ( |
| | | select *, |
| | | ROW_NUMBER() over (order by appe_time desc) as row |
| | | from ( |
| | | select distinct bill_no, bill_type, appe_time |
| | | from ints_wait_matout |
| | | where 1=1 |
| | | <include refid="condition"></include> |
| | | ) r |
| | | ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | </select> |
| | | <select id="getHeadPageCount" parameterType="java.util.Map" resultType="integer"> |
| | | |
| | | select count(1) from |
| | | ( |
| | | select *, |
| | | ROW_NUMBER() over (order by appe_time desc) as row |
| | | from ( |
| | | select distinct bill_no, bill_type, appe_time |
| | | from ints_wait_matout |
| | | where 1=1 |
| | | <include refid="condition"></include> |
| | | ) r |
| | | ) t |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | ,{field: 'matName', align: 'center',title: '产品名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80, hide: true} |
| | | ,{field: 'size', align: 'center',title: '尺寸'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '630px', |
| | | area: '800px', |
| | | offset: [top + 'px', (left - 530 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | |
| | | field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | | return util.toDateString(d.createTime); |
| | | }, width: 180 |
| | | } |
| | | }, |
| | | {field: 'outqty', title: '已出库量'}, |
| | | {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格'} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | type: 1, |
| | | title: (expTpe ? '修改' : '添加') + '单据', |
| | | content: $('#editDialog').html(), |
| | | area: '700px', |
| | | area: '1300px', |
| | | success: function (layero, dIndex) { |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | var isExpAdd = !expTpe; |
| | |
| | | billType: data.field.billType, |
| | | matNo: nList[xi].matNo, |
| | | matName: nList[xi].matName, |
| | | color: nList[xi].color, |
| | | size: nList[xi].size, |
| | | specs: nList[xi].specs, |
| | | memo: nList[xi].memo, |
| | | unit: nList[xi].unit, |
| | | qty: nList[xi].qty, |
| | | }) |
| | | } |
| | |
| | | {type: 'numbers'}, |
| | | {field: 'matNo', title: '物料编码'}, |
| | | {field: 'matName', title: '物料名称', width: 160}, |
| | | {field: 'specs', title: '规格', width: 160}, |
| | | {field: 'color', title: '颜色', width: 160}, |
| | | {field: 'size', title: '尺寸', width: 160}, |
| | | {field: 'unit', title: '单位', width: 160}, |
| | | {field: 'memo', title: '备注' , edit: true, width: 160}, |
| | | {field: 'qty', title: '修改数量', style: 'color: blue;font-weight: bold', edit: true, minWidth: 100, width: 100}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80} |
| | | ]], |
| | |
| | | }); |
| | | // 数量修改 |
| | | table.on('edit(formSSXMTable)', function (obj) { |
| | | let count = Number(obj.value); |
| | | if (isNaN(count)) { |
| | | layer.msg("请输入数字"); |
| | | } else { |
| | | if (count > 0) { |
| | | for (var i=0;i<xxDataList.length;i++){ |
| | | if (xxDataList[i]["matNo"] === obj.data.matNo){ |
| | | xxDataList[i]["qty"] = count; |
| | | break; |
| | | } |
| | | if (obj.field=='memo'){ |
| | | let vle = obj.value; |
| | | for (var i=0;i<xxDataList.length;i++) { |
| | | if (xxDataList[i]["matNo"] === obj.data.matNo) { |
| | | xxDataList[i]["memo"] = vle; |
| | | break; |
| | | } |
| | | } |
| | | }else if (obj.field=='qty'){ |
| | | let vle = Number(obj.value); |
| | | if (isNaN(vle)) { |
| | | layer.msg("请输入数字"); |
| | | } else { |
| | | layer.msg("数量必须大于零"); |
| | | if (vle > 0) { |
| | | for (var i=0;i<xxDataList.length;i++) { |
| | | if (xxDataList[i]["matNo"] === obj.data.matNo) { |
| | | xxDataList[i]["qty"] = vle; |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | layer.msg("数量必须大于零"); |
| | | } |
| | | } |
| | | } |
| | | insTbSSXM.reload({data: xxDataList}); |
| | |
| | | xxDataList.push({ |
| | | matNo: mat.matNo, |
| | | matName: mat.matName, |
| | | color:mat.color, |
| | | size:mat.size, |
| | | specs:mat.specs, |
| | | memo: mat.memo, |
| | | unit: mat.unit, |
| | | qty: 0.0 |
| | | }); |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | }).use(['layer', 'form', 'table', 'util', 'admin', 'xmSelect', 'laydate'], function () { |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var table = layui.table; |
| | | var util = layui.util; |
| | | var admin = layui.admin; |
| | | var xmSelect = layui.xmSelect; |
| | | var layDate = layui.laydate; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | // 渲染表格 |
| | | var insTb = table.render({ |
| | | elem: '#waitMatout', |
| | | url: baseUrl+'/waitMatout/head/page/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/waitMatout/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'billNo', align: 'center',title: '单据编号'} |
| | | ,{field: 'seqNo', align: 'center',title: '序号'} |
| | | ,{field: 'billType$', align: 'center',title: '单据类型'} |
| | | ,{field: 'matNo', align: 'center',title: '物料编码'} |
| | | ,{field: 'matName', align: 'center',title: '物料名称'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'unit', align: 'center',title: '单位'} |
| | | ,{field: 'size', align: 'center',title: '尺寸', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单重', hide: true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{field: 'outQty', align: 'center',title: '已出库量'} |
| | | ,{field: 'linkErp$', align: 'center',title: 'ERP连线'} |
| | | ,{field: 'ioStatus$', align: 'center',title: '完成状态'} |
| | | ,{field: 'ioTime$', align: 'center',title: '完成时间', hide: true} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员',event: 'modiUser', style: 'cursor:pointer', hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide: true} |
| | | ,{field: 'appeUser$', align: 'center',title: '建档人员',event: 'appeUser', style: 'cursor:pointer', hide: true} |
| | | ,{field: 'appeTime$', align: 'center',title: '建档时间', hide: true} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | {type: 'numbers'}, |
| | | {field: 'billNo', title: '单据编号', sort: true}, |
| | | {field: 'billType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'appeTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {align: 'center', title: '操作', toolbar: '#operate', minWidth: 130, width: 130} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(waitMatout)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | // 搜索 |
| | | form.on('submit(waitMatoutSearch)', function (data) { |
| | | insTb.reload({where: data.field, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(waitMatout)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | var ids = checkStatus.map(function (d) { |
| | | return d.seqNo; |
| | | }); |
| | | del(ids); |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | // 添加 |
| | | $("#waitMatoutAddBtn").click(function () { |
| | | showEditModel(); |
| | | }); |
| | | |
| | | // 工具条点击事件 |
| | | table.on('tool(waitMatout)', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | console.log(obj) |
| | | if (layEvent === 'edit') { |
| | | showEditModel(data); |
| | | } else if (layEvent === 'del') { |
| | | doDel(data.billNo); |
| | | } else if (layEvent === 'look') { |
| | | var $a = $(obj.tr).find('a[lay-event="look"]'); |
| | | var offset = $a.offset(); |
| | | var top = offset.top; |
| | | var left = offset.left; |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '800px', |
| | | offset: [top + 'px', (left - 530 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | | fixed: false, |
| | | content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>', |
| | | success: function (layero) { |
| | | table.render({ |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/waitMatout/list/auth', |
| | | where: { |
| | | bill_no: data.billNo |
| | | }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matNo', title: '物料编码'}, |
| | | {field: 'matName', title: '物料名称', width: 160}, |
| | | {field: 'qty', title: '数量', width: 90}, |
| | | { |
| | | field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | | return util.toDateString(d.createTime); |
| | | }, width: 180 |
| | | }, |
| | | {field: 'outqty', title: '已出库量'}, |
| | | {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格'}, |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function () { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 显示表单弹窗 |
| | | function showEditModel(expTpe) { |
| | | |
| | | //matOut ajax |
| | | // var DataList = []; |
| | | // $.ajax({ |
| | | // url: baseUrl+"/waitMatout/list/auth2?billNo=" + expTpe.billNo, |
| | | // headers: {'token': localStorage.getItem('token')}, |
| | | // contentType:'application/json;charset=UTF-8', |
| | | // method: 'POST', |
| | | // success: function (res) { |
| | | // console.log(res) |
| | | // var list=res.data.records; |
| | | // for (let i = 0; i < list.length; i++) { |
| | | // DataList.push(list[i]); |
| | | // } |
| | | // } |
| | | // }) |
| | | // console.log(DataList) |
| | | |
| | | admin.open({ |
| | | type: 1, |
| | | title: (expTpe ? '修改' : '添加') + '单据', |
| | | content: $('#editDialog').html(), |
| | | area: '1300px', |
| | | success: function (layero, dIndex) { |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | var isExpAdd = !expTpe; |
| | | // 回显数据 |
| | | form.val('editForm', expTpe); |
| | | if (expTpe) { |
| | | $('#billNo').attr("disabled", "disabled"); |
| | | } |
| | | // 表单提交事件 |
| | | form.on('submit(waitMatoutEditSubmit)', function (data) { |
| | | console.log(data) |
| | | // 组装数据 |
| | | if (xxDataList.length <= 0) { |
| | | layer.tips('请添加单据明细', '#matAddBtnComment', {tips: [1, '#ff4c4c']}); |
| | | return false; |
| | | } |
| | | var param = []; |
| | | var nList = admin.util.deepClone(xxDataList); |
| | | console.log(nList) |
| | | for (var xi = 0; xi < nList.length; xi++) { |
| | | if (nList[xi].outQty > 0 ) { |
| | | |
| | | } else if (nList[xi].qty > 0) { |
| | | param.push({ |
| | | billNo: data.field.billNo, |
| | | billType: data.field.billType, |
| | | matNo: nList[xi].matNo, |
| | | matName: nList[xi].matName, |
| | | color: nList[xi].color, |
| | | size: nList[xi].size, |
| | | specs: nList[xi].specs, |
| | | memo: nList[xi].memo, |
| | | unit: nList[xi].unit, |
| | | outQty: nList[xi].outQty, |
| | | qty: nList[xi].qty, |
| | | }) |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'waitMatout': exportData, |
| | | 'fields': fields |
| | | }; |
| | | } |
| | | if (param.length === 0) { |
| | | layer.msg('单据明细数量不合法', {icon: 2}); |
| | | return false; |
| | | } |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/waitMatout/export/auth", |
| | | url: baseUrl+"/waitMatout/" + (isExpAdd?"add":"modify") + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(waitMatout)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | var ids = [data.seqNo]; |
| | | del(ids); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/waitMatout/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | insTb.reload({page: {curr: 1}}); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | // 明细表格 |
| | | var xxDataList = []; |
| | | var tbOptions = { |
| | | elem: '#formSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | data: xxDataList, |
| | | page: true, |
| | | height: '350px;', |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matNo', title: '物料编码'}, |
| | | {field: 'matName', title: '物料名称', width: 160}, |
| | | {field: 'specs', title: '规格', width: 160}, |
| | | {field: 'color', title: '颜色', width: 160}, |
| | | {field: 'size', title: '尺寸', width: 160}, |
| | | {field: 'qty', title: '修改数量', style: 'color: blue;font-weight: bold', edit: true, minWidth: 100, width: 100}, |
| | | {field: 'unit', title: '单位', width: 160}, |
| | | {field: 'memo', title: '备注' , edit: true, width: 160}, |
| | | {field: 'outQty', title: '已出库量' , width: 160}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80} |
| | | ]], |
| | | done: function (res) { |
| | | var list= res.data |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |
| | | }; |
| | | if (!isExpAdd) { |
| | | $.ajax({ |
| | | url: baseUrl+"/waitMatout/detl/list/auth?billNo=" + expTpe.billNo, |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | xxDataList = res.data; |
| | | tbOptions.data = xxDataList; |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | var insTbSSXM = table.render(tbOptions); |
| | | // 工具条点击事件 |
| | | table.on('tool(formSSXMTable)', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | if (layEvent === 'edit') { |
| | | showEditModel2(data); |
| | | } else if (layEvent === 'del') { |
| | | layer.confirm('确定要删除吗?', { |
| | | shade: .1, |
| | | skin: 'layui-layer-admin' |
| | | }, function (i) { |
| | | layer.close(i); |
| | | for (var j = 0; j < xxDataList.length; j++) { |
| | | if (xxDataList[j].matNo === data.matNo) { |
| | | xxDataList.splice(j, 1); |
| | | break; |
| | | } |
| | | } |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | }); |
| | | } |
| | | }); |
| | | // 数量修改 |
| | | table.on('edit(formSSXMTable)', function (obj) { |
| | | debugger; |
| | | if (obj.field=='memo'){ |
| | | let vle = obj.value; |
| | | for (var i=0;i<xxDataList.length;i++) { |
| | | if (xxDataList[i]["matNo"] === obj.data.matNo) { |
| | | xxDataList[i]["memo"] = vle; |
| | | break; |
| | | } |
| | | } |
| | | }else if (obj.field=='qty'){ |
| | | let vle = Number(obj.value); |
| | | if (isNaN(vle)) { |
| | | layer.msg("请输入数字"); |
| | | } else { |
| | | if (vle > 0) { |
| | | for (var i=0;i<xxDataList.length;i++) { |
| | | if (xxDataList[i]["matNo"] === obj.data.matNo) { |
| | | xxDataList[i]["qty"] = vle; |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | layer.msg("数量必须大于零"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | insTbSSXM.reload({data: xxDataList}); |
| | | }); |
| | | // |
| | | $('#matAddBtnComment').click(function () { |
| | | showEditModel2(); |
| | | }); |
| | | |
| | | // 显示添加明细表单弹窗 |
| | | function showEditModel2(exp) { |
| | | admin.open({ |
| | | type: 1, |
| | | offset: '150px', |
| | | area: '480px', |
| | | title: (exp ? '修改' : '添加') + '明细', |
| | | content: $('#matEditDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | // 回显数据 |
| | | form.val('matEditForm', exp); |
| | | // 表单提交事件 |
| | | form.on('submit(matEditSubmit)', function (data) { |
| | | var existMats = []; |
| | | xxDataList.forEach(function(elem) { |
| | | existMats.push(elem.matNo); |
| | | }); |
| | | var selectList = matXmSelect.getValue(); |
| | | for (var i = 0; i<selectList.length; i++) { |
| | | var item = selectList[i]; |
| | | if (existMats.indexOf(item.value) === -1) { |
| | | // 查询物料详情 |
| | | $.ajax({ |
| | | url: baseUrl+"/matCode/"+item.value+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | var mat = res.data; |
| | | console.log(mat) |
| | | xxDataList.push({ |
| | | matNo: mat.matNo, |
| | | matName: mat.matName, |
| | | color:mat.color, |
| | | size:mat.size, |
| | | specs:mat.specs, |
| | | memo: mat.memo, |
| | | unit: mat.unit, |
| | | outQty: mat.outQty, |
| | | qty: 0.0 |
| | | }); |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | layer.close(dIndex); |
| | | return false; |
| | | }); |
| | | // 渲染物料选择 |
| | | var matXmSelect = xmSelect.render({ |
| | | el: '#mat', |
| | | style: { |
| | | width: '340px', |
| | | }, |
| | | autoRow: true, |
| | | toolbar: { show: true }, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | remoteMethod: function(val, cb, show){ |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/all/get/kv", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | condition: val |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | cb(res.data) |
| | | } else { |
| | | cb([]); |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | |
| | | // 删除单据 |
| | | function doDel(billNo) { |
| | | layer.confirm('确定要删除吗?', { |
| | | shade: .1, |
| | | skin: 'layui-layer-admin' |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | layer.load(2); |
| | | |
| | | $.ajax({ |
| | | url: baseUrl+"/waitMatout/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | data: { |
| | | billNo: billNo |
| | | }, |
| | | // contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | insTb.reload({page: {curr: 1}}); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender() { |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | | }); |
| | |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <!-- <link rel="stylesheet" href="../../static/css/cool.css" media="all">--> |
| | | <!-- <link rel="stylesheet" href="../../static/css/common.css" media="all">--> |
| | | |
| | | <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
| | | <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="bill_no" placeholder="单据编号" autocomplete="off"> |
| | | <!-- 正文开始 --> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <!-- 表格顶部工具栏 --> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | | <input name="bill_no" class="layui-input" type="text" placeholder="输入单据编号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | | <select name="bill_type" placeholder="请选择单据类型"> |
| | | <!-- 1:销售出库,2:领料出库,3:调拨出库,4:采购退回出库,5:其他出库--> |
| | | <option value="" style="display: none"></option> |
| | | <option value="1">销售出库</option> |
| | | <option value="2">领料出库</option> |
| | | <option value="3">调拨出库</option> |
| | | <option value="4">采购退回出库</option> |
| | | <option value="5">其他出库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="appe_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn icon-btn" lay-filter="waitMatoutSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button id="waitMatoutAddBtn" class="layui-btn icon-btn"><i class="layui-icon"></i>添加 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table id="waitMatout" lay-filter="waitMatout"></table> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" id="modi_time" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | 出库通知单:由ERP提供单据编号、类型、单据时间及物料明细,生成入库作业单,为维护系统高可用,用户可自行添加入库通知单数据,完成独立的入库作业。 |
| | | <span class="text-danger">手动添加时,请检查单据编号是否在ERP系统中已存在,避免发生数据错误问题。</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="waitMatout" lay-filter="waitMatout"></table> |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a> |
| | | </script> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="tbLook"> |
| | | <span class="layui-text"> |
| | | <a href="javascript:;" lay-event="look"> |
| | | <i class="layui-icon" style="font-size: 12px;"></i> 查看单据明细 |
| | | </a> |
| | | </span> |
| | | </script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="editForm" lay-filter="editForm" class="layui-form model-form" > |
| | | <input name="experimentTypeId" type="hidden"/> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单据类型:</label> |
| | | <div class="layui-input-block"> |
| | | <select name="billType" maxlength="20" lay-verType="tips" lay-verify="required"> |
| | | <option value="" style="display: none"></option> |
| | | <option value="1">销售出库</option> |
| | | <option value="2">领料出库</option> |
| | | <option value="3">调拨出库</option> |
| | | <option value="4">采购退回出库</option> |
| | | <option value="5">其他出库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单据编号:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="billNo" name="billNo" placeholder="输入单据编号" type="text" class="layui-input" maxlength="20" lay-verType="tips" lay-verify="required"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="position: relative;"> |
| | | <label class="layui-form-label">单据明细:</label> |
| | | <div class="layui-input-block"> |
| | | <table id="formSSXMTable" lay-filter="formSSXMTable"></table> |
| | | </div> |
| | | <button class="layui-btn layui-btn-sm icon-btn" id="matAddBtnComment" |
| | | style="position: absolute; left: 20px;top: 60px;padding: 0 5px;" type="button"> |
| | | <i class="layui-icon"></i>添加明细 |
| | | </button> |
| | | </div> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | <button class="layui-btn" lay-filter="waitMatoutEditSubmit" lay-submit>保存</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="formSSXMTableBar"> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>--> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a> |
| | | </script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="matEditDialog"> |
| | | <form id="matEditForm" lay-filter="matEditForm" class="layui-form model-form"> |
| | | <input name="experimentId" type="hidden"/> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">物料 - 多选</label> |
| | | <div class="layui-input-block"> |
| | | <div id="mat" name="mat"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | <button class="layui-btn" lay-filter="matEditSubmit" lay-submit>保存</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/waitMatout/waitMatout.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">单据编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="billNo" placeholder="请输入单据编号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">序号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="seqNo" placeholder="请输入序号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单据类型: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="billType"> |
| | | <option value="">请选择单据类型</option> |
| | | <option value="1">销售出库</option> |
| | | <option value="2">领料出库</option> |
| | | <option value="3">调拨出库</option> |
| | | <option value="4">采购退回出库</option> |
| | | <option value="5">其他出库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">物料编码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="matNo" placeholder="请输入物料编码" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">物料名称: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="matName" placeholder="请输入物料名称" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">数量: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="qty" placeholder="请输入数量"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">规格: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="specs" placeholder="请输入规格"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="unit" placeholder="请输入单位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">尺寸: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="size" placeholder="请输入尺寸"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">颜色: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="color" placeholder="请输入颜色"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单重: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="weight" placeholder="请输入单重"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">已出库量: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="outQty" placeholder="请输入已出库量"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">ERP连线: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="linkErp"> |
| | | <option value="">请选择ERP连线</option> |
| | | <option value="0">非连线</option> |
| | | <option value="1">ERP连线</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">完成状态: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="ioStatus"> |
| | | <option value="">请选择完成状态</option> |
| | | <option value="0">待处理</option> |
| | | <option value="1">出库中</option> |
| | | <option value="2">出库完成</option> |
| | | <option value="3">取消出库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">完成时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ioTime" id="ioTime$" placeholder="请输入完成时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="modiUser" placeholder="请输入修改人员"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="modiTime" id="modiTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">建档人员: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="appeUser" placeholder="请输入建档人员"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">建档时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="appeTime" id="appeTime$" placeholder="请输入建档时间"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |