|
@@ -55,7 +55,7 @@
|
|
|
import OrderSearch from './components/order-search.vue';
|
|
import OrderSearch from './components/order-search.vue';
|
|
|
import OrderDetail from './components/order-detail.vue';
|
|
import OrderDetail from './components/order-detail.vue';
|
|
|
import CreateOrder from './components/create-order.vue'
|
|
import CreateOrder from './components/create-order.vue'
|
|
|
- import { getPageList } from '@/api/saleOrder';
|
|
|
|
|
|
|
+ import { getPageList , deleteOrder } from '@/api/saleOrder';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -67,169 +67,176 @@
|
|
|
},
|
|
},
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
- // 表格列配置
|
|
|
|
|
- columns: [
|
|
|
|
|
|
|
+ // 加载状态
|
|
|
|
|
+ loading: false,
|
|
|
|
|
+ activeName:"first",
|
|
|
|
|
+ selection:[]
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ // 表格列配置
|
|
|
|
|
+ columns () {
|
|
|
|
|
+ const privateColumn = [];
|
|
|
|
|
+ if (this.activeName == 'first' ) {
|
|
|
|
|
+ privateColumn.push({
|
|
|
|
|
+ columnKey: 'action',
|
|
|
|
|
+ label: '操作',
|
|
|
|
|
+ width: 150,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ resizable: false,
|
|
|
|
|
+ slot: 'action',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ fixed:'right'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ return [
|
|
|
{
|
|
{
|
|
|
- width: 45,
|
|
|
|
|
- type: 'selection',
|
|
|
|
|
- columnKey: 'selection',
|
|
|
|
|
- align: 'center'
|
|
|
|
|
|
|
+ width: 45,
|
|
|
|
|
+ type: 'selection',
|
|
|
|
|
+ columnKey: 'selection',
|
|
|
|
|
+ align: 'center'
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- columnKey: 'index',
|
|
|
|
|
- label: '序号',
|
|
|
|
|
- type: 'index',
|
|
|
|
|
- width: 55,
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- fixed: 'left'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'code',
|
|
|
|
|
- label: '销售订单号',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110,
|
|
|
|
|
- slot: 'code'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'lineNumber',
|
|
|
|
|
- label: '行号',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'productCode',
|
|
|
|
|
- label: '产品编码',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'brandNo',
|
|
|
|
|
- label: '牌号',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'model',
|
|
|
|
|
- label: '型号',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'contractNum',
|
|
|
|
|
- label: '合同数量',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'lackNum',
|
|
|
|
|
- label: '欠交数量',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
- prop: 'orderLibraryType',
|
|
|
|
|
- label: '按单按库',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110,
|
|
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
|
|
- return this.getDictValue('按单按库', _row.orderLibraryType);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ columnKey: 'index',
|
|
|
|
|
+ label: '序号',
|
|
|
|
|
+ type: 'index',
|
|
|
|
|
+ width: 55,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ fixed: 'left'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'deliveryRequirements',
|
|
|
|
|
- label: '交付要求',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110,
|
|
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
|
|
- return this.getDictValue('交付要求', _row.deliveryRequirements);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ prop: 'code',
|
|
|
|
|
+ label: '销售订单号',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110,
|
|
|
|
|
+ slot: 'code'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'orderType',
|
|
|
|
|
- label: '订单类型',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110,
|
|
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
|
|
- return this.getDictValue('订单类型', _row.orderType);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ prop: 'lineNumber',
|
|
|
|
|
+ label: '行号',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'orderSource',
|
|
|
|
|
- label: '订单来源',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110,
|
|
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
|
|
- return this.getDictValue('订单来源', _row.orderSource);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ prop: 'productCode',
|
|
|
|
|
+ label: '产品编码',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'status',
|
|
|
|
|
- label: '生产状态',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110,
|
|
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
|
|
- return this.getDictValue('生产状态', _row.status);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ prop: 'brandNo',
|
|
|
|
|
+ label: '牌号',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'createTime',
|
|
|
|
|
- label: '下达时间',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ prop: 'model',
|
|
|
|
|
+ label: '型号',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'deliveryTime',
|
|
|
|
|
- label: '交付日期',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ prop: 'contractNum',
|
|
|
|
|
+ label: '合同数量',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'customerName',
|
|
|
|
|
- label: '客户名称',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ prop: 'lackNum',
|
|
|
|
|
+ label: '欠交数量',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'salesman',
|
|
|
|
|
- label: '业务员',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ prop: 'orderLibraryType',
|
|
|
|
|
+ label: '按单按库',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110,
|
|
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
|
|
+ return this.getDictValue('按单按库', _row.orderLibraryType);
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- columnKey: 'action',
|
|
|
|
|
- label: '操作',
|
|
|
|
|
- width: 150,
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- resizable: false,
|
|
|
|
|
- slot: 'action',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- fixed:'right'
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
- // 加载状态
|
|
|
|
|
- loading: false,
|
|
|
|
|
- activeName:"first",
|
|
|
|
|
- selection:[]
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ prop: 'deliveryRequirements',
|
|
|
|
|
+ label: '交付要求',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110,
|
|
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
|
|
+ return this.getDictValue('交付要求', _row.deliveryRequirements);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'orderType',
|
|
|
|
|
+ label: '订单类型',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110,
|
|
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
|
|
+ return this.getDictValue('订单类型', _row.orderType);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'orderSource',
|
|
|
|
|
+ label: '订单来源',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110,
|
|
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
|
|
+ return this.getDictValue('订单来源', _row.orderSource);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'status',
|
|
|
|
|
+ label: '生产状态',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110,
|
|
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
|
|
+ return this.getDictValue('生产状态', _row.status);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'createTime',
|
|
|
|
|
+ label: '下达时间',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'deliveryTime',
|
|
|
|
|
+ label: '交付日期',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'customerName',
|
|
|
|
|
+ label: '客户名称',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'salesman',
|
|
|
|
|
+ label: '业务员',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ ...privateColumn
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- computed: {},
|
|
|
|
|
created () {
|
|
created () {
|
|
|
this.requestDict('按单按库');
|
|
this.requestDict('按单按库');
|
|
|
this.requestDict('交付要求');
|
|
this.requestDict('交付要求');
|
|
@@ -276,7 +283,10 @@
|
|
|
this.$refs.createDialog.open(row)
|
|
this.$refs.createDialog.open(row)
|
|
|
},
|
|
},
|
|
|
remove(row){
|
|
remove(row){
|
|
|
-
|
|
|
|
|
|
|
+ deleteOrder([row.id]).then(res=>{
|
|
|
|
|
+ this.$message.success(res)
|
|
|
|
|
+ this.reload()
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|