|
@@ -110,8 +110,15 @@
|
|
|
v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
|
|
|
@click="handleDispatching(record)" >派工</operation-button>-->
|
|
|
<operation-button
|
|
|
+ v-show='dispatchFlag'
|
|
|
v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
|
|
|
@click="handleAssign(record)" >派工</operation-button>
|
|
|
+ <operation-button
|
|
|
+ v-show='!dispatchFlag'
|
|
|
+ v-if="$auth('repair-application-forms-deal') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === record.status)"
|
|
|
+ :type='2'
|
|
|
+ title="是否要接收?"
|
|
|
+ @confirm="handleReceive(record)">接收</operation-button>
|
|
|
</template>
|
|
|
</span>
|
|
|
<span slot="status" slot-scope="text">
|
|
@@ -138,7 +145,13 @@ import BaseOutForm from './modules/BaseOutForm'
|
|
|
import AssignForm from './modules/AssignForm'
|
|
|
import Detail from './modules/DetailRepair'
|
|
|
import DetailOut from './modules/DetailRepairOut'
|
|
|
-import { getRepairApplicationFormPage, deleteRepairApplicationForms, fetchRepairApplicationForm, exportRepairApplicationForm } from '@/api/repair/application-form'
|
|
|
+import {
|
|
|
+ getRepairApplicationFormPage,
|
|
|
+ deleteRepairApplicationForms,
|
|
|
+ fetchRepairApplicationForm,
|
|
|
+ exportRepairApplicationForm,
|
|
|
+ receive
|
|
|
+} from '@/api/repair/application-form'
|
|
|
import DispatchBaseForm from '@/views/repair/application-form/modules/DispatchBaseForm'
|
|
|
|
|
|
export default {
|
|
@@ -173,6 +186,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
visible: true,
|
|
|
+ dispatchFlag: true,
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{
|
|
@@ -330,6 +344,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
+ const repairModel = this.DictCache.getConfigValueByType(this.DictCache.TYPE.REPAIR_STRATEGY_MODEL)
|
|
|
+ if (repairModel === this.DictCache.VALUE.REPAIR_MODEL_TYPE.BASE_MODEL) {
|
|
|
+ this.dispatchFlag = false
|
|
|
+ }
|
|
|
// 下拉框map
|
|
|
this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
|
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
|
|
@@ -405,6 +423,15 @@ export default {
|
|
|
const modal = this.$refs.assignForm
|
|
|
modal.base(record)
|
|
|
},
|
|
|
+ handleReceive (record) {
|
|
|
+ const temp = this
|
|
|
+ fetchRepairApplicationForm({ id: record.id }).then(res => {
|
|
|
+ receive(res.data).then(() => {
|
|
|
+ temp.handleOk()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
handleOk () {
|
|
|
this.visible = true
|
|
|
this.queryParam.searchStartTime = this.queryParam.searchStartTime ? this.BaseTool.Date.formatter(this.queryParam.searchStartTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
|