qy-renren-qt/dist/2209300913/static/js/21.js
2022-09-30 09:18:17 +08:00

1 line
9.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

webpackJsonp([21,41],{"0TT5":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:t.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:t.visible},on:{"update:visible":function(e){t.visible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"80px"},nativeOn:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:"仓库",prop:"warehouseName"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择仓库"},on:{change:function(e){t.warehouseC()}},model:{value:t.dataForm.warehouseName,callback:function(e){t.$set(t.dataForm,"warehouseName",e)},expression:"dataForm.warehouseName"}},t._l(t.warehouseArr,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"任务类型",prop:"taskType"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择任务类型"},model:{value:t.dataForm.taskType,callback:function(e){t.$set(t.dataForm,"taskType",e)},expression:"dataForm.taskType"}},t._l(t.options,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"起点",prop:"startPosition"}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择起点"},model:{value:t.dataForm.startPosition,callback:function(e){t.$set(t.dataForm,"startPosition",e)},expression:"dataForm.startPosition"}},t._l(t.startPositionArr,function(t){return a("el-option",{key:t.id,attrs:{label:t.anotherName,value:t.id}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"终点",prop:"endPosition"}},[a("el-select",{attrs:{clearable:"",disabled:"",placeholder:"请选择终点"},model:{value:t.dataForm.endPosition,callback:function(e){t.$set(t.dataForm,"endPosition",e)},expression:"dataForm.endPosition"}},t._l(t.endPosition,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"remarks"}},[a("el-input",{attrs:{placeholder:"备注",clearable:""},model:{value:t.dataForm.remarks,callback:function(e){t.$set(t.dataForm,"remarks",e)},expression:"dataForm.remarks"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.visible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dataFormSubmit()}}},[t._v("确定")])],1)],1)},staticRenderFns:[]},n=a("VU/8")({data:function(){return{visible:!1,dataForm:{id:0,warehouseName:"",taskType:0,startPosition:"",endPosition:"",remarks:""},options:[{value:0,label:"出库"}],warehouseArr:[{value:"A",label:"A库"},{value:"B",label:"B库"}],endPosition:[{value:290,label:"A库出口"},{value:292,label:"B库出口"}],productArr:[],startPositionArr:[],dataRule:{taskType:[{required:!0,message:"任务类型0 出库1入库2 移库不能为空",trigger:"blur"}],warehouseName:[{required:!0,message:"仓库不能为空",trigger:"change"}],startPosition:[{required:!0,message:"起点不能为空",trigger:"change"}],endPosition:[{required:!0,message:"终点不能为空",trigger:"change"}]}}},methods:{init:function(t){var e=this;this.dataForm.id=t||"",this.visible=!0,this.$nextTick(function(){e.$refs.dataForm.resetFields(),e.dataForm.id&&e.$http({url:e.$http.adornUrl("/work/mttaskinfo/info/"+e.dataForm.id),method:"get",params:e.$http.adornParams()}).then(function(t){var a=t.data;a&&0===a.code&&(e.dataForm=a.mtTaskInfo)}),e.$http({url:e.$http.adornUrl("/work/mtproduct/list"),method:"get",params:e.$http.adornParams({page:1,limit:500,key:""})}).then(function(t){var a=t.data;a&&0===a.code?e.productArr=a.page.list:e.productArr=[]}),e.$http({url:e.$http.adornUrl("/work/mtwarehousrank/list"),method:"get",params:e.$http.adornParams({page:1,limit:500,key:""})}).then(function(t){var a=t.data;a&&0===a.code?e.startPositionArr=a.page.list.splice(0,a.page.list.length-4):e.startPositionArr=[]})})},warehouseC:function(){"A"===this.dataForm.warehouseName?this.dataForm.endPosition=290:this.dataForm.endPosition=292},dataFormSubmit:function(){var t=this;this.$refs.dataForm.validate(function(e){e&&t.$http({url:t.$http.adornUrl("/work/mttaskinfo/"+(t.dataForm.id?"update":"saveout")),method:"post",data:t.$http.adornData(t.dataForm)}).then(function(e){var a=e.data;a&&0===a.code?t.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}}):t.$message.error(a.msg)})})}}},r,!1,null,null,null);e.default=n.exports},PVZ9:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={data:function(){return{dataForm:{key:""},dataList:[],pageIndex:1,pageSize:10,totalPage:0,dataListLoading:!1,addOrUpdateVisible:!1}},components:{AddOrUpdate:a("0TT5").default},activated:function(){this.getDataList()},methods:{getDataList:function(){var t=this;this.dataListLoading=!0,this.$http({url:this.$http.adornUrl("/work/mttaskinfo/list"),method:"get",params:this.$http.adornParams({page:this.pageIndex,limit:this.pageSize,key:this.dataForm.key})}).then(function(e){var a=e.data;a&&0===a.code?(t.dataList=a.page.list,t.totalPage=a.page.totalCount):(t.dataList=[],t.totalPage=0),t.dataListLoading=!1})},sizeChangeHandle:function(t){this.pageSize=t,this.pageIndex=1,this.getDataList()},currentChangeHandle:function(t){this.pageIndex=t,this.getDataList()},addOrUpdateHandle:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick(function(){e.$refs.addOrUpdate.init(t)})},runtask:function(t){var e=this;console.log(t),this.$http({url:this.$http.adornUrl("/work/mttaskinfo/runtask"),method:"post",data:this.$http.adornData(t,!1)}).then(function(t){var a=t.data;a&&0===a.code?e.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){e.getDataList()}}):e.$message.error(a.msg)})},deleteHandle:function(t){var e=this;this.$confirm("确定对[id="+t+"]进行删除操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$http({url:e.$http.adornUrl("/work/mttaskinfo/delete"),method:"post",data:e.$http.adornData(t,!1)}).then(function(t){var a=t.data;a&&0===a.code?e.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){e.getDataList()}}):e.$message.error(a.msg)})})}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mod-config"},[a("el-form",{attrs:{inline:!0,model:t.dataForm},nativeOn:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.getDataList()}}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"参数名",clearable:""},model:{value:t.dataForm.key,callback:function(e){t.$set(t.dataForm,"key",e)},expression:"dataForm.key"}})],1),t._v(" "),a("el-form-item",[a("el-button",{on:{click:function(e){t.getDataList()}}},[t._v("查询")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.addOrUpdateHandle()}}},[t._v("新增")])],1)],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.dataListLoading,expression:"dataListLoading"}],staticStyle:{width:"100%"},attrs:{data:t.dataList,stripe:!0,"header-cell-style":{background:"#eef1f6",color:"#606266",height:"56px"},border:""}},[a("el-table-column",{attrs:{type:"index",label:"序号","header-align":"center",align:"center",width:"50"}}),t._v(" "),a("el-table-column",{attrs:{prop:"createTime","header-align":"center",align:"center",label:"添加时间"}}),t._v(" "),a("el-table-column",{attrs:{prop:"userName","header-align":"center",align:"center",label:"操作员名称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"taskType","header-align":"center",align:"center",label:"任务类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(0===e.row.taskType?"出库":1===e.row.taskType?"入库":"移库"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"status","header-align":"center",align:"center",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(0===e.row.status?"接收数据":1===e.row.status?"数据接收中":2===e.row.status?"数据接收完成":"等待接收数据"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"taskCode","header-align":"center",align:"center",label:"任务编码"}}),t._v(" "),a("el-table-column",{attrs:{prop:"productCode","header-align":"center",align:"center",label:"产品编码"}}),t._v(" "),a("el-table-column",{attrs:{prop:"specModel","header-align":"center",align:"center",label:"具体型号"}}),t._v(" "),a("el-table-column",{attrs:{prop:"num","header-align":"center",align:"center",label:"数量"}}),t._v(" "),a("el-table-column",{attrs:{prop:"remarks","header-align":"center",align:"center",label:"备注"}}),t._v(" "),a("el-table-column",{attrs:{fixed:"right","header-align":"center",align:"center",width:"200",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.$router.push({name:"mttaskinfodet",params:{id:e.row.id}})}}},[t._v("子任务")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.runtask(e.row.id)}}},[t._v("执行")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.deleteHandle(e.row.id)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("el-pagination",{attrs:{"current-page":t.pageIndex,"page-sizes":[10,20,50,100],"page-size":t.pageSize,total:t.totalPage,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":t.sizeChangeHandle,"current-change":t.currentChangeHandle}}),t._v(" "),t.addOrUpdateVisible?a("add-or-update",{ref:"addOrUpdate",on:{refreshDataList:t.getDataList}}):t._e()],1)},staticRenderFns:[]},o=a("VU/8")(r,n,!1,null,null,null);e.default=o.exports}});