| | |
| | | <template> |
| | | <div style="padding: 10px;"> |
| | | <div style="padding: 10px; position: relative;"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="78px" class="searchBox"> |
| | | <el-form-item label="开始日期" style="margin-left: 100px;"> |
| | | <el-date-picker v-model="sTime" type="date" placeholder="开始日期" style="width: 150px;"> |
| | |
| | | <el-form-item label="往来单位" prop="HSupName"> |
| | | <el-input v-model="queryParams.HSupName" placeholder="请输入往来单位" @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <div slot="header" class="clearfix"><span>过滤</span></div> |
| | | <div slot="header" class="clearfix"><span>其他条件</span></div> |
| | | <div> |
| | | <el-row> |
| | | <el-form-item label-width="0"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-col :span="2"><span>过滤</span></el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="queryParams.ColName1" placeholder="请选择" @change="riqiChange"> |
| | | <span v-for="(item, index) in btList" :key="index"> |
| | | <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option> |
| | |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-col :span="10"> |
| | | <el-input v-model="queryParams.ColContent1" placeholder="请输入" clearable |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-col> |
| | |
| | | <el-row> |
| | | <el-form-item label-width="0"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-col :span="2"><span>过滤</span></el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="queryParams.ColName2" placeholder="请选择" @change="riqiChange"> |
| | | <span v-for="(item, index) in btList" :key="index"> |
| | | <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option> |
| | |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-col :span="10"> |
| | | <el-input v-model="queryParams.ColContent2" placeholder="请输入" clearable |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-col> |
| | |
| | | </el-row> |
| | | <el-form-item label-width="0"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-col :span="2"><span>过滤</span></el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="queryParams.ColName" placeholder="请选择" @change="riqiChange"> |
| | | <el-option v-for="(item, index) in btList" :key="index" :label="item.field" |
| | | :value="item.field"></el-option> |
| | |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-col :span="10"> |
| | | <el-input v-model="queryParams.ColContent" placeholder="请输入" clearable |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-col> |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single" |
| | | @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">复制</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-tickets" size="mini" :disabled="single" |
| | | @click="handleMove(row = rowForm, OperationType = 4)">下推(器具直接调拨单)</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除 |
| | |
| | | <div :style="item.style"> |
| | | <span v-if="column.property.includes('日期')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span> |
| | | <el-button type="text" @click="handleEdit(row, OperationType = 2)" |
| | | v-else-if="column.property == '单据号'">{{ |
| | | row.单据号 |
| | | }}</el-button> |
| | | v-else-if="column.property == '单据号'">{{row.单据号}}</el-button> |
| | | <span v-else>{{ row[column.label] }}</span> |
| | | </div> |
| | | </template> |
| | |
| | | <edit :OperationType=OperationType :linterid=this.rowForm.hmainid :HSouceBillType=this.rowForm.HSourceBillType |
| | | :copyType="copyType" @editClose="editClose" v-if="editShow" /> |
| | | </el-dialog> |
| | | <!-- 下推 --> |
| | | <el-dialog title="下推器具直接调拨单" :visible.sync="openMove" width="1480px" append-to-body class="xsckdBox" @close="close"> |
| | | <move :OperationType='4' :propsData='moveData' :HSouceBillType=BillType |
| | | @editClose="moveClose" v-if="moveShow" /> |
| | | </el-dialog> |
| | | <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body> |
| | | <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName' |
| | | :HModName='HModName' @rowEditClose="rowSetClose" v-if="printListShow" /> |
| | |
| | | import axios from 'axios' |
| | | import RowSettings from '@/views/component/rowSettings' |
| | | import Edit from '@/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit' |
| | | import Move from '@/views/scMould/warehouse/Sc_MouldProdMoveBillEdit' |
| | | import PrintList from '@/views/component/printList' |
| | | import moment from 'moment'; |
| | | |
| | | export default { |
| | | name: 'Sc_MouldMoveStockRequestBillList', |
| | | components: { RowSettings, Edit, PrintList }, |
| | | components: { RowSettings, Edit, Move,PrintList }, |
| | | props: { |
| | | openPage: { type: String, }, |
| | | HOrgID: { type: String, }, |
| | | }, |
| | | data() { |
| | | return { |
| | | HModName: "Sc_MouldMoveStockRequestBillList", |
| | | rowList:[], |
| | | activeSeach: '', |
| | | editShow: false, |
| | | openEdit: false, |
| | | moveShow: false, |
| | | openMove: false, |
| | | moveData:'', |
| | | totalNameList: [], |
| | | tableShow: true, |
| | | openPrintList: false, |
| | |
| | | page: 1, |
| | | pageSize: 0, |
| | | total: 0, |
| | | BillType:'3850', |
| | | }; |
| | | }, |
| | | created() { |
| | | // this.fetchData() |
| | | if(this.openPage && this.HOrgID){ |
| | | this.queryParams.HStockOutOrgID = this.HOrgID |
| | | } |
| | | this.riqiChange() |
| | | this.getList(); |
| | | }, |
| | |
| | | if (this.pageSize == 0) { |
| | | this.pageSize = 50 |
| | | } |
| | | // 销售出库单列表 |
| | | // 列表 |
| | | axios.get(this.baseURL + '/Sc_MouldMoveStockRequestBillController/page', { |
| | | params: { |
| | | "sWhere": this.sWhere, |
| | | "user": sessionStorage["HUserName"], |
| | | "page": this.page, |
| | | "size": this.pageSize |
| | | "size": this.pageSize, |
| | | "Type": this.BillType, |
| | | }, |
| | | }).then(response => { |
| | | this.tyResList = response.data.data//总数据 |
| | |
| | | this.selectedRow = row; // 记录当前选中的行 |
| | | this.lastSelectedRowIndex = this.tableData.indexOf(row); |
| | | this.$refs.tableData.toggleRowSelection(row); |
| | | if (this.openPage) { |
| | | this.$emit('deptEmit', this.rowList, this.BillType) |
| | | } |
| | | }, |
| | | //选中行高亮样式 |
| | | rowStyle({ row, rowIndex }) { |
| | | if (this.ids.includes(row.hmainid)) { |
| | | if (this.ids.includes(row.sorderid)) { |
| | | return { "background": "#ecf5ff" } |
| | | } |
| | | }, |
| | | //双击行 |
| | | handleDblclick(row, column, cell, event) { |
| | | this.OperationType = 2 |
| | | this.handleEdit() |
| | | this.handleEdit(row); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | // this.rowForm = {} |
| | | this.ids = selection.map(item => item.hmainid) |
| | | this.rowList=selection |
| | | this.ids = selection.map(item => item.sorderid) |
| | | this.single = selection.length != 1 |
| | | this.multiple = !selection.length |
| | | if (!this.single) { |
| | |
| | | } |
| | | this.sWhere += " and " + this.queryParams.ColName2 + " " + com2; |
| | | } |
| | | if (this.queryParams.HStatus) { |
| | | switch (this.queryParams.HStatus) { |
| | | case '-1': //全部 |
| | | this.sWhere += ""; |
| | | break; |
| | | case '0': //未审核 |
| | | this.sWhere += " and 审核人=''"; |
| | | break; |
| | | case '1': //已审核 |
| | | this.sWhere += " and 审核人<>''"; |
| | | break; |
| | | case '2': //已关闭 |
| | | this.sWhere += " and 关闭人<>''"; |
| | | default: |
| | | } |
| | | } |
| | | if (this.sTime) { |
| | | this.sTime = moment(this.sTime).format('YYYY-MM-DD') |
| | | this.sWhere += " and 日期 >= '" + this.sTime + "'"; |
| | |
| | | this.sWhere += " and 部门 like '%" + this.queryParams.HDept + "%'"; |
| | | } |
| | | if (this.queryParams.HModelNumber) { |
| | | this.sWhere += " and 模具代码 like '%" + this.queryParams.HModelNumber + "%'"; |
| | | this.sWhere += " and 器具代码 like '%" + this.queryParams.HModelNumber + "%'"; |
| | | } |
| | | if (this.queryParams.HSupName) { |
| | | this.sWhere += " and 往来单位 like '%" + this.queryParams.HSupName + "%'"; |
| | | } |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | /** 重置按钮操作 */ |
| | |
| | | ColContent2: '', |
| | | ColContent: '', |
| | | } |
| | | this.clearData() |
| | | this.riqiChange() |
| | | this.resetForm("queryForm") |
| | | this.getList() |
| | |
| | | this.tableShow = true |
| | | this.openEdit = false |
| | | this.editShow = false |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | //打开新增组件弹窗 |
| | |
| | | this.editShow = true |
| | | this.openEdit = true |
| | | }, |
| | | //打开下推组件弹窗 |
| | | handleMove() { |
| | | if (this.rowList.length > 0) { |
| | | var dataArray = []; |
| | | var HSupTypeID_Temp = this.rowList[0].HSupTypeID |
| | | var HStockInOrgID_Temp = this.rowList[0].HSTOCKORGINID |
| | | for (var i = 0; i < this.rowList.length; i++) { |
| | | if (this.rowList[i].单据状态 != "已审核") { |
| | | this.$modal.msgSuccess("下推失败!所选单据【" + this.rowList[i].单据号 + "】不为已审核状态,不允许下推!") |
| | | return; |
| | | } |
| | | if (this.rowList[i].HQtyMust <= 0) { |
| | | this.$modal.msgSuccess("下推失败!所选单据【" + this.rowList[i].单据号 + "】对应可下推数量必须大于 0 !") |
| | | return; |
| | | } |
| | | if (this.rowList[i].HSupTypeID != HSupTypeID_Temp) { |
| | | this.$modal.msgSuccess("下推失败!所选单据对应往来类型必须一致!") |
| | | return; |
| | | } |
| | | if (this.rowList[i].HSTOCKORGINID != HStockInOrgID_Temp) { |
| | | this.$modal.msgSuccess("下推失败!所选单据对应调入组织必须一致!") |
| | | return; |
| | | } |
| | | var temp = { |
| | | "hmainid": this.rowList[i].hmainid |
| | | , "hsubid": this.rowList[i].hsubid |
| | | , "HBillType": this.rowList[i].HBillType |
| | | } |
| | | dataArray.push(temp); |
| | | } |
| | | var datajson = { |
| | | "data": dataArray |
| | | }; |
| | | this.moveData = JSON.stringify(datajson) |
| | | this.moveShow = true |
| | | this.openMove = true |
| | | } else { |
| | | layer.msg('请选择数据下推!'); |
| | | } |
| | | }, |
| | | //关闭编辑页面 |
| | | editClose(val) { |
| | | this.open = val |
| | | this.editShow = false |
| | | this.openEdit = val |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | //关闭下推页面 |
| | | moveClose(val) { |
| | | this.open = val |
| | | this.editShow = false |
| | | this.openEdit = val |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | //清除选中数据的缓存 |
| | | clearData(){ |
| | | this.ids = [] |
| | | this.multiple = true |
| | | this.single = true |
| | | this.OperationType = 0 |
| | | this.copyType = 0 |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete() { |
| | |
| | | let result = response.data |
| | | if (result.count == 1) { |
| | | this.$modal.msgSuccess('操作成功'); |
| | | this.clearData() |
| | | this.getList(); |
| | | } |
| | | else { |
| | |
| | | |
| | | } |
| | | // var content= ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=Kf_SellOutBillList', 'yes'] |
| | | }, |
| | | |
| | | //#region 获取公司名,根据公司进行定制化开发 |
| | | defaintOperationByCompanyName() { |
| | | var result = false; |
| | | axios.get(this.baseURL + '/Xt_getInfo/getCompanyName').then(response => { |
| | | var data1 = response.data |
| | | if (data1.count == 1) { |
| | | if (data1.data == "水务") { |
| | | result = true; |
| | | } |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | return result; |
| | | }, |
| | | } |
| | | }; |