| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <script>
- Vue.component('aggregateSupplyOperation', {
- props: {
- operationType:{
- type:Number|String,
- default:'',
- },
- operationOrder:{
- type:Object|String,
- default:{},
- },
- dialog_show:{
- type:Number,
- default:0,
- },
- },
- delimiters: ['[[', ']]'],
- data(){
- return{
- }
- },
- watch:{
- dialog_show(val) {
- if (this.operationType == 'jd-supplier-create-order') {
- this.createOrder(this.operationOrder.id);
- } else if( this.operationType == 'jd-supplier-unlock-order') {
- this.unlockOrder(this.operationOrder.id);
- }
-
- },
- },
- mounted: function(){
-
-
- },
- methods:{
- createOrder(id) {
- this.$http.post('{!! yzWebFullUrl('plugin.fight-groups.admin.controllers.jd-order-list.create-order') !!}',{order_id:this.operationOrder.id}).then(function (response) {
- if (response.data.result) {
- this.$message({type: 'success',message: '操作成功!'});
- }
- else{
- this.$message({type: 'error',message: response.data.msg});
- }
- this.$emit('search');
- },function (response) {
- this.$message({type: 'error',message: response.data.msg});
- })
- },
- unlockOrder(id) {
- this.$http.post('{!! yzWebFullUrl('plugin.fight-groups.admin.controllers.jd-order-list.unlock-order') !!}',{order_id:this.operationOrder.id}).then(function (response) {
- if (response.data.result) {
- this.$message({type: 'success',message: '解锁成功!'});
- }
- else{
- this.$message({type: 'error',message: response.data.msg});
- }
- this.$emit('search');
- },function (response) {
- this.$message({type: 'error',message: response.data.msg});
- })
- },
- },
- template: `<div></div>`,
-
- });
-
- </script>
|