|
@@ -8,20 +8,19 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="订单号">
|
|
|
- <!-- -->
|
|
|
- <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
|
|
|
+ <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="款号">
|
|
|
- <a-input placeholder="请输入款号" v-model="queryParam.styleNum"></a-input>
|
|
|
+ <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-input placeholder="请输入品名" v-model="queryParam.name"></a-input>
|
|
|
+ <a-input placeholder="请输入品名" v-model="queryParam.productName"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -45,7 +44,7 @@
|
|
|
<a-button type="primary" icon="download" @click="handleExportXls('预装箱单-成衣')">导出</a-button>
|
|
|
|
|
|
<a-upload
|
|
|
- name="file"
|
|
|
+ productName="file"
|
|
|
:showUploadList="false"
|
|
|
:multiple="false"
|
|
|
:headers="tokenHeader"
|
|
@@ -64,41 +63,106 @@
|
|
|
:columns="adPaListClothesColumns"
|
|
|
:data-source="adPaListClothesData"
|
|
|
:loading="loading"
|
|
|
- :pagination="ipagination"
|
|
|
+ :pagination="pagination"
|
|
|
:row-key="record => record.id"
|
|
|
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
|
@change="handleTableChange"
|
|
|
:scroll="{ x: 1500 }"
|
|
|
>
|
|
|
<!-- 推送状态 -->
|
|
|
- <!-- slot-scope="text, record" -->
|
|
|
- <span slot="pushStateSlot">
|
|
|
- <!-- v-if="record.isRelease == '0'" -->
|
|
|
- <a-tag color="#f50">未推送</a-tag>
|
|
|
- <!-- <a-tag color="#87d068" v-else>已发布</a-tag> -->
|
|
|
+ <span slot="pushStatesSlot" slot-scope="text, record">
|
|
|
+ <a-tag color="#2db7f5" v-if="record.pushStatus == '0'">未推送</a-tag>
|
|
|
+ <a-tag color="#87d068" v-if="record.pushStatus == '1'">推送成功</a-tag>
|
|
|
+ <a-tag color="#f50" v-if="record.pushStatus == '2'">推送失败</a-tag>
|
|
|
</span>
|
|
|
|
|
|
<!-- 单据状态 -->
|
|
|
- <span slot="documentStateSlot">
|
|
|
- <a-tag color="#2db7f5">已保存</a-tag>
|
|
|
+ <span slot="statusSlot" slot-scope="text, record">
|
|
|
+ <a-tag color="orange" v-if="record.status == '0'">已保存</a-tag>
|
|
|
+ <a-tag color="green" v-if="record.status == '1'">已提交</a-tag>
|
|
|
</span>
|
|
|
|
|
|
- <!-- 操作 -->
|
|
|
+ <!-- 操作 默认按钮 未提交未推送-->
|
|
|
<span slot="operationSlot" slot-scope="text, record">
|
|
|
- <a @click="derive(record)" style="color:green;">导出</a>
|
|
|
+ <a href="javascript:void(0);" @click="itemXls('')" style="color:green">导出</a>
|
|
|
+
|
|
|
<a-divider type="vertical" />
|
|
|
+
|
|
|
<a-dropdown>
|
|
|
- <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
|
|
|
- <a-menu slot="overlay">
|
|
|
- <a-menu-item><a @click="submit(record)">提交</a></a-menu-item>
|
|
|
- <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
|
|
|
- <a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
|
|
|
+ <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
|
|
|
+ <!-- 已保存 -->
|
|
|
+ <a-menu slot="overlay" v-if="record.status == '0'">
|
|
|
+ <a-menu-item>
|
|
|
+ <a @click="details(record)">详情</a>
|
|
|
+ </a-menu-item>
|
|
|
+
|
|
|
+ <a-menu-item>
|
|
|
+ <a @click="edit(record)">编辑</a>
|
|
|
+ </a-menu-item>
|
|
|
+
|
|
|
<a-menu-item>
|
|
|
- <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
|
|
|
+ <a-popconfirm title="确定提交吗?" ok-text="是" cancel-text="否" @confirm="submit(record)">
|
|
|
+ <a href="javascript:void(0);" style="color:green;">提交</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record)">
|
|
|
<a href="javascript:void(0);" style="color:red;">删除</a>
|
|
|
</a-popconfirm>
|
|
|
</a-menu-item>
|
|
|
- <a-menu-item><a @click="copy(record)">复制</a></a-menu-item>
|
|
|
+ </a-menu>
|
|
|
+
|
|
|
+ <!-- 已提交 且 推送成功 -->
|
|
|
+ <a-menu slot="overlay" v-if="record.pushStatus == '1' && record.status == '1'">
|
|
|
+ <a-menu-item>
|
|
|
+ <a @click="details(record)">详情</a>
|
|
|
+ </a-menu-item>
|
|
|
+ </a-menu>
|
|
|
+
|
|
|
+ <!-- 已提交 且 推送失败 -->
|
|
|
+ <a-menu slot="overlay" v-if="record.pushStatus == '2' && record.status == '1'">
|
|
|
+ <a-menu-item>
|
|
|
+ <a @click="details(record)">详情</a>
|
|
|
+ </a-menu-item>
|
|
|
+
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定重新推送吗?" ok-text="是" cancel-text="否" @confirm="rePush(record)">
|
|
|
+ <a href="javascript:void(0);" style="color:green;">重新推送</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+ </a-menu>
|
|
|
+
|
|
|
+ <!-- 已提交 -->
|
|
|
+ <a-menu slot="overlay" v-if="record.status == '1'">
|
|
|
+ <a-menu-item>
|
|
|
+ <a @click="details(record)">详情</a>
|
|
|
+ </a-menu-item>
|
|
|
+
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancelSubmit(record)">
|
|
|
+ <a href="javascript:void(0);" style="color:red;">取消提交</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push(record)">
|
|
|
+ <a href="javascript:void(0);" style="color:green;">推送</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+ </a-menu>
|
|
|
+
|
|
|
+ <!-- 未推送 -->
|
|
|
+ <a-menu slot="overlay" v-if="record.pushStatus == '0'">
|
|
|
+ <a-menu-item>
|
|
|
+ <a @click="details(record)">详情</a>
|
|
|
+ </a-menu-item>
|
|
|
+
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push(record)">
|
|
|
+ <a href="javascript:void(0);" style="color:green;">推送</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
</a-menu>
|
|
|
</a-dropdown>
|
|
|
</span>
|
|
@@ -107,9 +171,11 @@
|
|
|
|
|
|
<!-- 抽屉 -->
|
|
|
<div>
|
|
|
+ <detailsAdpacking-drawer ref="detailsAdpackingDrawer" @ok="modalFormOk"></detailsAdpacking-drawer>
|
|
|
+
|
|
|
<addAdpacking-drawer ref="addAdpackingDrawer" :father="aa" @ok="modalFormOk"></addAdpacking-drawer>
|
|
|
- <detailsAdpacking-drawer ref="detailsAdpackingDrawer" :father="bb" @ok="modalFormOk"></detailsAdpacking-drawer>
|
|
|
- <editAdpacking-drawer ref="editAdpackingDrawer" :father="cc" @ok="modalFormOk"></editAdpacking-drawer>
|
|
|
+
|
|
|
+ <editAdpacking-drawer ref="editAdpackingDrawer" @ok="modalFormOk"></editAdpacking-drawer>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -122,27 +188,31 @@ import addAdpackingDrawer from '@views/advance-packingList/addAdpackingDrawer.vu
|
|
|
import detailsAdpackingDrawer from '@views/advance-packingList/detailsAdpackingDrawer.vue'
|
|
|
import editAdpackingDrawer from '@views/advance-packingList/editAdpackingDrawer.vue'
|
|
|
|
|
|
+import { getadPaList, itemByMainId } from '@api/document/advance-packingList.js'
|
|
|
+
|
|
|
export default {
|
|
|
- name: 'AdPaListClothes', // 预装线单-成衣
|
|
|
+ productName: 'AdPaListClothes', // 预装线单-成衣
|
|
|
mixins: [JeecgListMixin],
|
|
|
components: { JEllipsis, moment, addAdpackingDrawer, detailsAdpackingDrawer, editAdpackingDrawer },
|
|
|
|
|
|
data() {
|
|
|
let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
|
|
|
return {
|
|
|
+ loading: false, // 表格加载
|
|
|
+ id: '',
|
|
|
// 表头
|
|
|
adPaListClothesColumns: [
|
|
|
{
|
|
|
title: '款号',
|
|
|
- dataIndex: 'styleNum',
|
|
|
+ dataIndex: 'itemNumber',
|
|
|
width: 120,
|
|
|
fixed: 'left',
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
- title: '客户简称',
|
|
|
- dataIndex: 'customerShortName',
|
|
|
- width: 120,
|
|
|
+ title: '客户(简称)',
|
|
|
+ dataIndex: 'customer',
|
|
|
+ width: 100,
|
|
|
fixed: 'left',
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -159,7 +229,7 @@ export default {
|
|
|
{
|
|
|
title: '小po',
|
|
|
dataIndex: 'smallPo',
|
|
|
- width: 120,
|
|
|
+ width: 100,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
@@ -178,46 +248,113 @@ export default {
|
|
|
{
|
|
|
title: '颜色',
|
|
|
dataIndex: 'color',
|
|
|
- width: 120,
|
|
|
+ width: 180,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '采购/委外订单号',
|
|
|
dataIndex: 'purchaseAboardOrderNum',
|
|
|
- width: 160,
|
|
|
+ width: 220,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '订单类型',
|
|
|
dataIndex: 'orderType',
|
|
|
+ width: 100,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '工厂单价',
|
|
|
+ dataIndex: 'aa',
|
|
|
+ width: 100,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '数量(按合并规则累计)',
|
|
|
+ dataIndex: 'bb',
|
|
|
+ width: 200,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '箱数',
|
|
|
+ dataIndex: 'boxNumber',
|
|
|
+ width: 100,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '总净重',
|
|
|
+ dataIndex: 'totalNetWeight',
|
|
|
+ width: 100,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总毛重',
|
|
|
+ dataIndex: 'totalGrossWeight',
|
|
|
+ width: 100,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总体积',
|
|
|
+ dataIndex: 'totalVolume',
|
|
|
+ width: 100,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总价',
|
|
|
+ dataIndex: 'totalPrice',
|
|
|
+ width: 100,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '集装箱代号',
|
|
|
+ dataIndex: 'containerCode',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
- title: '原因',
|
|
|
- dataIndex: 'reason',
|
|
|
+ title: '集装箱号',
|
|
|
+ dataIndex: 'containerNumber',
|
|
|
width: 120,
|
|
|
- customRender: t => ellipsis(t),
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '预托书号',
|
|
|
+ dataIndex: 'depositaryReceiptNo',
|
|
|
+ width: 100,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '成衣工厂',
|
|
|
+ dataIndex: 'garmentFactory',
|
|
|
+ width: 160,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '推送状态',
|
|
|
- dataIndex: 'pushState',
|
|
|
+ dataIndex: 'pushStatus',
|
|
|
width: 90,
|
|
|
- scopedSlots: { customRender: 'pushStateSlot' },
|
|
|
+ scopedSlots: { customRender: 'pushStatesSlot' },
|
|
|
fixed: 'right',
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '单据状态',
|
|
|
- dataIndex: 'documentState',
|
|
|
+ dataIndex: 'status',
|
|
|
width: 90,
|
|
|
- scopedSlots: { customRender: 'documentStateSlot' },
|
|
|
+ scopedSlots: { customRender: 'statusSlot' },
|
|
|
fixed: 'right',
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
-
|
|
|
+ {
|
|
|
+ title: '备注(原因)',
|
|
|
+ dataIndex: 'memo',
|
|
|
+ width: 220,
|
|
|
+ fixed: 'right',
|
|
|
+ customRender: t => ellipsis(t),
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
{
|
|
|
title: '操作',
|
|
|
dataIndex: 'operation',
|
|
@@ -227,32 +364,96 @@ export default {
|
|
|
className: 'replacecolor'
|
|
|
}
|
|
|
],
|
|
|
- adPaListClothesData: [{}, {}, {}, {}],
|
|
|
- selectedRowKeys: [], // 勾选航
|
|
|
- loading: false, // 表格加载
|
|
|
+ adPaListClothesData: [],
|
|
|
|
|
|
// 查询条件
|
|
|
queryParam: {
|
|
|
- orderNum: '',
|
|
|
- styleNum: '',
|
|
|
- name: '' // 品名
|
|
|
+ pageNo: '',
|
|
|
+ orderNumber: '',
|
|
|
+ itemNumber: '',
|
|
|
+ productName: '' // 品名
|
|
|
},
|
|
|
- url: {
|
|
|
- // syncUser: '/act/process/extActProcess/doSyncUser',
|
|
|
- list: '/sys/user/list',
|
|
|
- // delete: '/sys/user/delete',
|
|
|
- // deleteBatch: '/sys/user/deleteBatch',
|
|
|
- exportXlsUrl: '/sys/user/exportXls', // 导出
|
|
|
- importExcelUrl: 'sys/user/importExcel' // 导入
|
|
|
- }
|
|
|
+ // 分页
|
|
|
+ pagination: {
|
|
|
+ // total: '',
|
|
|
+ // current: 0,
|
|
|
+ // pageSize: 0
|
|
|
+ },
|
|
|
+ selectedRowKeys: [], // 勾选航
|
|
|
+ dateFormat: 'YYYY-MM-DD'
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- // this.getAdPaListClothes()
|
|
|
+ this.getadPaListClothes()
|
|
|
},
|
|
|
methods: {
|
|
|
- // 第一行导出
|
|
|
- handleExportXls() {},
|
|
|
+ // 分页查询 预装箱单-成衣
|
|
|
+ getadPaListClothes() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ getadPaList(this.queryParam).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.adPaListClothesData = res.result.records
|
|
|
+ console.log('预装箱单-成衣列表', this.adPaListClothesData)
|
|
|
+ this.pagination = {
|
|
|
+ total: res.result.total,
|
|
|
+ current: res.result.current,
|
|
|
+ pageSize: res.result.size
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 详情
|
|
|
+ details(record) {
|
|
|
+ console.log('点击的record', record)
|
|
|
+ this.$refs.detailsAdpackingDrawer.visible = true
|
|
|
+ itemByMainId({ id: record.id }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ // console.log('点击的对象', res.result)
|
|
|
+ // 把通过id查询到的对象,赋值给子组件
|
|
|
+ this.$refs.detailsAdpackingDrawer.detailsAdpacking = record
|
|
|
+ this.$refs.detailsAdpackingDrawer.data = res.result.adPaListClothesData
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 删除
|
|
|
+ handleDelete(record) {
|
|
|
+ console.log('点击删除项id:', record.id)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ deleteAdPaList({ id: record.id }).then(res => {
|
|
|
+ console.log('res:', res)
|
|
|
+ this.getadPaListClothes()
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 导出
|
|
|
+ handleExportXls(fileName) {
|
|
|
+ console.log('需导出的fileName:', fileName)
|
|
|
+ const params = this.dyeLossRateData
|
|
|
+ console.log('导出参数', params)
|
|
|
+ // downFile('/scas/dyeLoss/excel', params).then(data => {
|
|
|
+ // console.log('888')
|
|
|
+ // if (!data) {
|
|
|
+ // this.$message.warning('文件下载失败')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ // window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
|
|
+ // } else {
|
|
|
+ // let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
+ // let link = document.createElement('a')
|
|
|
+ // link.style.display = 'none'
|
|
|
+ // link.href = url
|
|
|
+ // link.setAttribute('download', fileName + '.xls')
|
|
|
+ // document.body.appendChild(link)
|
|
|
+ // link.click()
|
|
|
+ // document.body.removeChild(link) // 下载完成移除元素
|
|
|
+ // window.URL.revokeObjectURL(url) // 释放掉blob对象
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ },
|
|
|
|
|
|
// 新增 预装箱单
|
|
|
addAdpackingDrawer() {
|
|
@@ -262,55 +463,43 @@ export default {
|
|
|
|
|
|
// 第二行 查询按钮
|
|
|
searchQuery() {
|
|
|
- // this.getAnnList() // 渲染公告
|
|
|
+ this.getadPaListClothes()
|
|
|
},
|
|
|
// 重置
|
|
|
searchReset() {
|
|
|
- // console.log('>>>>重置')
|
|
|
this.queryParam = {}
|
|
|
- // this.getAnnList()
|
|
|
+ this.getadPaListClothes()
|
|
|
},
|
|
|
|
|
|
- // 操作 导出
|
|
|
- derive() {},
|
|
|
- // 操作 提交
|
|
|
+ // 操作 单条数据导出
|
|
|
+ itemXls() {},
|
|
|
+ // 提交
|
|
|
submit() {},
|
|
|
- // 操作 详情
|
|
|
- details(record) {
|
|
|
- console.log('详情')
|
|
|
- console.log('点击的record', record.id)
|
|
|
- this.$refs.detailsAdpackingDrawer.visible = true
|
|
|
- },
|
|
|
|
|
|
- // 操作 编辑
|
|
|
+ // 编辑
|
|
|
edit(record) {
|
|
|
console.log('编辑')
|
|
|
this.$refs.editAdpackingDrawer.visible = true
|
|
|
},
|
|
|
|
|
|
- // 操作 删除
|
|
|
- handleDelete() {},
|
|
|
-
|
|
|
// 选中行
|
|
|
onSelectChange(keys, rows) {
|
|
|
this.selectedRowKeys = keys
|
|
|
this.selectedRows = rows
|
|
|
},
|
|
|
- // --------------------------------------
|
|
|
- aa() {},
|
|
|
- bb() {},
|
|
|
- cc() {}
|
|
|
- // 分页、排序、筛选变化时触发
|
|
|
- // handleTableChange(pagination, filters, sorter) {
|
|
|
- // // console.log('当前页信息>>>>',pagination)
|
|
|
- // this.queryParam.pageNo = pagination.current
|
|
|
- // // this.getAnnList()
|
|
|
- // }
|
|
|
+
|
|
|
+ handleTableChange(pagination, filters, sorter) {
|
|
|
+ // console.log('当前页信息>>>>',pagination)
|
|
|
+ this.queryParam.pageNo = pagination.current
|
|
|
+ this.getadPaListClothes()
|
|
|
+ },
|
|
|
+ aa() {}
|
|
|
},
|
|
|
+
|
|
|
computed: {
|
|
|
// 导入
|
|
|
- importExcelUrl: function() {
|
|
|
- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
|
|
+ importExcelUrl() {
|
|
|
+ // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
|
|
},
|
|
|
// 选中项
|
|
|
rowSelection() {
|