123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <template>
- <a-modal
- title="其他入库的纱"
- v-model="otherYarnsInModVis"
- :confirmLoading="confirmLoading"
- width="86%"
- :footer="null"
- >
- <!-- tabel 加载 -->
- <a-spin :spinning="confirmLoading">
- <!-- 查询 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="8">
- <a-form-item label="委外订单号">
- <a-input placeholder="请输入委外订单号" v-model="queryParam.ccode"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="计划号">
- <a-input placeholder="请输入计划号" v-model="queryParam.cplanCode"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
- <a @click="handleToggleSearch" style="margin-left: 8px">
- {{ toggleSearchStatus ? '收起' : '展开' }}
- <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
- </a>
- </span>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- table -->
- <div>
- <a-table
- bordered
- :loading="loading"
- :columns="otherYarnsInColumns"
- :data-source="otherYarnsInData"
- :pagination="false"
- :scroll="{ y: 500 }"
- :footer="showTotal"
- >
- </a-table>
- <!-- 导出 打印 返回 -->
- <a-row style="marginTop:20px;">
- <a-col :md="24" :sm="12">
- <span style="float: right;" class="table-operator">
- <a-button type="primary" icon="download" @click="handleExportXls('其他入库的纱')">导出</a-button>
- <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
- <a-button type="primary" @click="backFabricLossTable" icon="rollback">返回</a-button>
- </span>
- </a-col>
- </a-row>
- </div>
- </a-spin>
- </a-modal>
- </template>
- <script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- export default {
- name: 'OtherYarnsInModal', // 其他入库的纱 弹框
- mixins: [JeecgListMixin],
- components: { JEllipsis },
- data() {
- return {
- // 表头
- otherYarnsInColumns: [
- {
- title: '序号',
- width:80,
- customRender: (text, record, index) => {
- if (record.ccode == "合计")
- return "";
- else
- return index + 1;
- }
- },
- {
- title: '委外订单号',
- dataIndex: 'ccode',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '批号',
- dataIndex: 'cbatch',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '使用数量',
- dataIndex: 'iquantity',
- width: 120,
- className: 'replacecolor'
- },
-
- {
- title: '计划号',
- dataIndex: 'cplanCode',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '采购单价',
- dataIndex: 'iprice',
- width: 120,
- className: 'replacecolor'
- }
- ],
- otherYarnsInData: [],
- allDataList:[],
- loading: false, // 表格加载
- // orderDataform: this.$form.createForm(this),
- confirmLoading: false,
- otherYarnsInModVis: false,
- // 查询条件
- queryParam: {
- purchaseAboardOrderNum: '', // 委外订单号
- planNum: '' // 计划号
- }
- }
- },
- // 接收父组件 方法
- props: {
- father: {
- type: Function,
- default: null
- }
- },
- created() {},
- computed: {
- // 合计展示
- totalDataSource(){
- // 开票成本-衬衣 合计
- var item = {
- "ccode":"合计"
- };
- var iquantity = 0;
- for (let row of this.otherYarnsInData){
- iquantity += row.iquantity*1;
- }
-
- item.iquantity= parseFloat(iquantity.toFixed(4));
- return [item];
- }
- },
- methods: {
- // 第一行 导出
- handleExportXls() {},
- // 打印
- print() {},
- // 返回
- backFabricLossTable() {
- console.log('返回到面料损耗表')
- // this.$router.push('fabricLoss-table')
- // this.surplusYarnModVis = false
- this.close()
- },
- // 弹框查询按钮
- searchQuery() {
- this.otherYarnsInData = this.allDataList.filter(e=>(this.queryParam.ccode == null || e.ccode.toLowerCase().indexOf(this.queryParam.ccode.toLowerCase())>-1)
- && (this.queryParam.cplanCode == null || e.cplanCode.toLowerCase().indexOf(this.queryParam.cplanCode.toLowerCase())>-1));
- },
- // 重置
- searchReset() {
- this.queryParam = {}
- // this.getShipmentList()
- },
- close() {
- this.$emit('close')
- this.otherYarnsInModVis = false
- },
- showTotal(data) {
- return (
- <a-table
- rowKey={Math.random}
- bordered={false}
- pagination={false}
- columns={this.otherYarnsInColumns}
- dataSource={this.totalDataSource || []}
- showHeader={false}
- ></a-table>
- )
- },
- }
- }
- </script>
- <style lang="less" scoped>
- @import '~@assets/less/common.less';
- @import '~@assets/less/overwriter.less';
- /deep/ .ant-table-thead > tr > th {
- text-align: center;
- // font-weight: 700;
- }
- /deep/ .ant-table-tbody {
- text-align: center;
- }
- // /deep/ th.replacecolor {
- // background-color: #ccc;
- // }
- </style>
|