扣数维护逻辑调整

dev-scheduling
zhangdi 2 months ago
parent 16859092bb
commit 0f1406997e
  1. 4
      src/api/productionManagement/deductionPreserve.js
  2. 17
      src/views/productionManagement/deductionPreserve/editDialog.vue
  3. 17
      src/views/productionManagement/deductionPreserve/index.vue

@ -18,9 +18,7 @@ export const getWorkOrderByCardNo = (params) => {
return request({ return request({
url: '/blade-desk/deductionPreserve/workOrderByCardNo', url: '/blade-desk/deductionPreserve/workOrderByCardNo',
method: 'get', method: 'get',
params: { params: params,
...params,
},
}); });
}; };

@ -22,6 +22,10 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
rowItem:{
type: Object,
default: () => ({})
}
}, },
data() { data() {
return { return {
@ -78,17 +82,10 @@ export default {
}, },
mounted() { mounted() {
this.openShow = this.showDialog; this.openShow = this.showDialog;
// this.getWorkOrderByCardNo() this.form = this.rowItem
}, },
methods: { methods: {
getWorkOrderByCardNo() {
getWorkOrderByCardNo({
cardNo: this.cardNo,
}).then(res => {
console.log(res, 'res');
this.form = res.data.data;
});
},
closeDialog(type) { closeDialog(type) {
this.openShow = false; this.openShow = false;
this.$emit('closeDialog', type); this.$emit('closeDialog', type);
@ -105,9 +102,11 @@ export default {
done(); done();
}) })
.catvh(err => { .catvh(err => {
this.closeDialog(true);
this.saveLoading = false; this.saveLoading = false;
}); });
} else { } else {
this.closeDialog(true);
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
} }

@ -36,13 +36,14 @@
:showDialog="editOpen" :showDialog="editOpen"
:cardNo="cardNo" :cardNo="cardNo"
@closeDialog="closeDialog" @closeDialog="closeDialog"
:rowItem="rowItem"
></editDialog> ></editDialog>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import editDialog from './editDialog.vue'; import editDialog from './editDialog.vue';
import { getList } from '@/api/productionManagement/deductionPreserve'; import { getList,getWorkOrderByCardNo } from '@/api/productionManagement/deductionPreserve';
export default { export default {
components: { components: {
@ -205,20 +206,28 @@ export default {
}, },
data: [], data: [],
rowItem:{}
}; };
}, },
methods: { methods: {
// //
queryOrder() { queryOrder() {
this.editOpen = true; this.loading = true;
getWorkOrderByCardNo({cardNo:this.cardNo}).then(res => {
this.rowItem = res.data.data
this.editOpen = true;
this.loading = false
}).catch(err=>{
this.loading = false
})
}, },
closeDialog(type) { closeDialog(type) {
this.isRushOpen = false; this.isRushOpen = false;
this.isBatchOpen = false; this.isBatchOpen = false;
this.editOpen = false; this.editOpen = false;
if(type){ if (type) {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
} }
}, },

Loading…
Cancel
Save