|
@@ -45,8 +45,8 @@
|
|
|
<el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
|
|
<el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
|
|
|
<el-table-column prop="id" label="ID" width="100"> </el-table-column>
|
|
<el-table-column prop="id" label="ID" width="100"> </el-table-column>
|
|
|
<!-- <el-table-column prop="assetId" label="资产ID"> </el-table-column> -->
|
|
<!-- <el-table-column prop="assetId" label="资产ID"> </el-table-column> -->
|
|
|
- <el-table-column prop="name" label="名称" show-overflow-tooltip> </el-table-column>
|
|
|
|
|
- <el-table-column prop="pic" label="作品内容" width="90" align="center">
|
|
|
|
|
|
|
+ <el-table-column prop="name" label="名称" show-overflow-tooltip> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="pic" label="作品内容" width="90" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
<el-image
|
|
<el-image
|
|
|
style="width: 30px; height: 30px"
|
|
style="width: 30px; height: 30px"
|
|
@@ -58,13 +58,25 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="contactName" label="收货人"> </el-table-column>
|
|
<el-table-column prop="contactName" label="收货人"> </el-table-column>
|
|
|
<el-table-column prop="contactPhone" label="收货电话"> </el-table-column>
|
|
<el-table-column prop="contactPhone" label="收货电话"> </el-table-column>
|
|
|
- <el-table-column prop="address" label="收货地址"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="address" label="收货地址" show-overflow-tooltip> </el-table-column>
|
|
|
<el-table-column prop="courier" label="快递"> </el-table-column>
|
|
<el-table-column prop="courier" label="快递"> </el-table-column>
|
|
|
<el-table-column prop="courierId" label="快递单号"> </el-table-column>
|
|
<el-table-column prop="courierId" label="快递单号"> </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" fixed="right" width="150">
|
|
|
|
|
|
|
+ <el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
|
|
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" width="200">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
|
|
|
|
|
- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button>
|
|
|
|
|
|
|
+ <el-button @click="editRow(row)" type="primary" size="mini" plain>查看</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ @click="receiveAsset(row)"
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ plain
|
|
|
|
|
+ v-if="row.status == 'DELIVERY'"
|
|
|
|
|
+ >已发货</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button @click="finish(row)" type="success" size="mini" plain v-if="row.status == 'RECEIVE'"
|
|
|
|
|
+ >已收货</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -89,6 +101,21 @@
|
|
|
>
|
|
>
|
|
|
</el-pagination>
|
|
</el-pagination>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog title="发快递" :visible.sync="showDialog" width="460px">
|
|
|
|
|
+ <el-form :model="couriers" inline>
|
|
|
|
|
+ <el-form-item label="快递公司" prop="courier" :rules="{ required: true, message: '请输入快递公司' }">
|
|
|
|
|
+ <el-input v-model="couriers.courier" style="width: 300px"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="快递单号" prop="courierId" :rules="{ required: true, message: '请输入快递单号' }">
|
|
|
|
|
+ <el-input v-model="couriers.courierId" style="width: 300px"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer">
|
|
|
|
|
+ <el-button @click="showDialog = false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="delivery">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -103,7 +130,15 @@ export default {
|
|
|
multipleMode: false,
|
|
multipleMode: false,
|
|
|
search: '',
|
|
search: '',
|
|
|
url: '/assetPost/all',
|
|
url: '/assetPost/all',
|
|
|
- downloading: false
|
|
|
|
|
|
|
+ downloading: false,
|
|
|
|
|
+ statusOptions: [
|
|
|
|
|
+ { label: '待发货', value: 'DELIVERY' },
|
|
|
|
|
+ { label: '待收货', value: 'RECEIVE' },
|
|
|
|
|
+ { label: '已完成', value: 'FINISH' },
|
|
|
|
|
+ { label: '已取消', value: 'CANCELLED' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ showDialog: false,
|
|
|
|
|
+ couriers: {}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -112,6 +147,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ statusFormatter(row, column, cellValue, index) {
|
|
|
|
|
+ let selectedOption = this.statusOptions.find(i => i.value === cellValue);
|
|
|
|
|
+ if (selectedOption) {
|
|
|
|
|
+ return selectedOption.label;
|
|
|
|
|
+ }
|
|
|
|
|
+ return '';
|
|
|
|
|
+ },
|
|
|
beforeGetData() {
|
|
beforeGetData() {
|
|
|
return { search: this.search, query: { del: false } };
|
|
return { search: this.search, query: { del: false } };
|
|
|
},
|
|
},
|
|
@@ -184,6 +226,46 @@ export default {
|
|
|
this.$message.error(e.error);
|
|
this.$message.error(e.error);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ },
|
|
|
|
|
+ finish(row) {
|
|
|
|
|
+ this.$alert('确定此订单已完成?', '提示', { type: 'primary' })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ return this.$http.post('/assetPost/updateStatus/', {
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ status: finish
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$message.success('完成');
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ if (e !== 'cancel') {
|
|
|
|
|
+ console.log(e.error);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ receiveAsset(row) {
|
|
|
|
|
+ this.showDialog = true;
|
|
|
|
|
+ this.couriers.id = row.id;
|
|
|
|
|
+ },
|
|
|
|
|
+ delivery() {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/assetPost/receiveAsset', {
|
|
|
|
|
+ id: this.couriers.id,
|
|
|
|
|
+ courier: this.couriers.courier,
|
|
|
|
|
+ courierId: this.couriers.courierId
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.showDialog = false;
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ message: '取消输入'
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|