123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385 |
- <template>
- <a-modal
- title="参照预装箱单"
- v-model="referencePrePacklist"
- :confirmLoading="confirmLoading"
- @ok="onSubmit"
- @cancel="handleCancel"
- width="86%"
- style="top:330px;left:100px;"
- >
- <!-- 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.customerAbbreviation"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="预发货日期">
- <a-date-picker placeholder="请选择预发货日期" v-model="queryParam.preDeliveryDate" format="YYYY-MM-DD"
- @change="deliveryDateChange"></a-date-picker>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="小PO">
- <a-input placeholder="请输入小PO" v-model="queryParam.smallPo"></a-input>
- </a-form-item>
- </a-col>
- <template v-if="toggleSearchStatus">
- <a-col :md="6" :sm="8">
- <a-form-item label="分销点">
- <a-input placeholder="请输入分销点" v-model="queryParam.distributionPoint"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="款号">
- <a-input placeholder="请输入款号" v-model="queryParam.itemNumber"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="是否被参照">
- <a-select v-model="queryParam.isReference" style="width: 200px" placeholder="请选择发货情况" >
- <a-select-option value="n">未被参照</a-select-option>
- <a-select-option value="y">已被参照</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="发货情况">
- <a-select v-model="queryParam.orderStatus" style="width: 200px" placeholder="请选择发货情况" >
- <a-select-option value="n">超发</a-select-option>
- <a-select-option value="y">正常</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </template>
- <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 , y: 300 -->
- <div class="anotherTable">
- <a-table
- :columns="advancePackingListColumns"
- :data-source="advancePackingListData"
- :loading="loading"
- :pagination="pagination"
- row-key="id"
- :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
- @change="handleTableChange"
- bordered
- :scroll="{ x: 2000 }"
- size="small"
- >
- </a-table>
- </div>
- </a-spin>
- </a-modal>
- </template>
- <script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import moment from 'moment'
- import { orderSpltList } from '@api/document/packing-list/packinglist-clothes.js'
- export default {
- name: 'AdvancePackingListModal', // 参照预装箱单 弹框
- mixins: [JeecgListMixin],
- components: { JEllipsis, moment },
- data() {
- let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
- return {
-
- // 查询条件
- queryParam: {
- customer: '', //客户
- preDeliveryDate: '', // 预发货日期
- smallPo: '' , // 小PO
- distributionPoint: '' , //分销点
- itemNumber: '', //款号
- pageNo:1,
- isReference:'', // 是否被参照
- },
- selectedRowKeys: [], // 勾选航
- loading: false, // 表格加载
- // 表头
- advancePackingListColumns: [
- {
- title: '款号',
- dataIndex: 'itemNumber',
- width: 120,
- fixed: 'left',
- className: 'replacecolor'
- },
- {
- title: '客户简称',
- dataIndex: 'customerAbbreviation',
- width: 120,
- fixed: 'left',
- customRender: t => ellipsis(t),
- className: 'replacecolor'
- },
- {
- title: '预发货日期',
- dataIndex: 'preDeliveryDate',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '小PO',
- dataIndex: 'smallPo',
- width: 120,
- customRender: t => ellipsis(t),
- className: 'replacecolor'
- },
- // {
- // title: '创建时间',
- // dataIndex: 'createTime',
- // align: 'center',
- // sorter: true,
- // customRender: text => {
- // return moment(text).format('YYYY-MM-DD')
- // }
- // },
-
- {
- title: '分销点',
- dataIndex: 'distributionPoint',
- width: 120,
- customRender: t => ellipsis(t),
- className: 'replacecolor'
- },
- {
- title: '备注',
- dataIndex: 'u8Remarks',
- width: 150,
- customRender: t => ellipsis(t),
- className: 'replacecolor'
- },
- {
- title: '客户',
- dataIndex: 'customer',
- width: 250,
- customRender: t => ellipsis(t),
- className: 'replacecolor'
- },
- {
- title: '存货名称',
- dataIndex: 'inventoryName',
- width: 150,
- customRender: t => ellipsis(t),
- className: 'replacecolor'
- },
- {
- title: '颜色',
- dataIndex: 'colour',
- width: 120,
- customRender: t => ellipsis(t),
- className: 'replacecolor'
- },
- {
- title: '采购/委外订单号',
- dataIndex: 'spurOrSubOrder',
- width: 200,
- customRender: t => ellipsis(t),
- className: 'replacecolor'
- },
- {
- title: '工厂单价',
- dataIndex: 'factoryUnitPrice',
- width: 120,
- className: 'replacecolor'
- },
-
- {
- title: '箱数',
- dataIndex: 'totalBoxes',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: '数量(按合并规则累计)',
- dataIndex: 'total',
- width: 200,
- className: 'replacecolor'
- },
- {
- title: '订单类型',
- dataIndex: 'orderType',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '集装箱代号',
- dataIndex: 'containerCode',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '集装箱号',
- dataIndex: 'containerNumber',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '总净重',
- dataIndex: 'totalNetWeight',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: '总毛重',
- dataIndex: 'totalGrossWeight',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: '总体积',
- dataIndex: 'totalVolume',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: '总价',
- dataIndex: 'totalPrice',
- width: 90,
- className: 'replacecolor'
- },
- ],
- advancePackingListData: [],
- pagination: {
- // total: '',
- // current: 0,
- // pageSize: 0
- },
- // orderDataform: this.$form.createForm(this),
- confirmLoading: false,
- referencePrePacklist: false
- }
- },
- // 接收父组件 方法
- props: {
- father: {
- type: Function,
- default: null
- }
- },
- created() {
- },
- methods: {
- //参考数据
- getAdvancePackingListData() {
- this.$nextTick(() => {
- //if (this.queryParam.preDeliveryDate != undefined && this.queryParam.preDeliveryDate != "")
- orderSpltList(this.queryParam).then(res => {
- if (res.success) {
- this.advancePackingListData = res.result.records;
- this.advancePackingListData.map(item =>{
- var str =item.preDeliveryDate
- var n=str.split(" ");
- item.preDeliveryDate = n[0]
- })
- this.pagination = {
- total: res.result.total,
- current: res.result.current,
- pageSize: res.result.size
- }
- }else {
- that.$message.error(res.message);
- }
- })
- })
- },
-
- // 弹框查询按钮
- searchQuery() {
- this.queryParam.pageNo = 1
- this.getAdvancePackingListData()
- },
- // 重置
- searchReset() {
- this.queryParam = {}
- this.getAdvancePackingListData()
- // this.getShipmentList()
- },
- // 弹框确定
- onSubmit() {
- if (this.selectedRowKeys.length == 0) {
- this.$message.error('请选择数据');
- } else if(this.selectedRowKeys.length == 1){
- this.$emit('callback', this.selectedRowKeys);
- this.referencePrePacklist = false;
- var msg = "选中记录后,会清除编辑的内容。";
- this.$message.info(msg);
- this.selectedRowKeys = [];
- }else {
- this.$message.error('只能选择一行数据!');
- }
- },
- close() {
- this.$emit('close')
- this.queryParam ={}
- this.referencePrePacklist = false
- },
- handleCancel() {
- this.selectedRowKeys = [];
- this.close()
- },
- handleTableChange(pagination, filters, sorter) {
- this.queryParam.pageNo = pagination.current
- this.getAdvancePackingListData()
- },
- // 选中行
- onSelectChange(keys, rows) {
- this.selectedRowKeys = keys;
- },
- deliveryDateChange(value, dateString) {
- this.queryParam.preDeliveryDate = dateString
- },
- },
- computed: {
- }
- }
- </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>
|