123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920 |
- <template>
- <a-modal
- title="详情"
- width="85%"
- :visible="visible"
- :maskClosable="false"
- :confirmLoading="confirmLoading"
- @cancel="handleCancel"
- destroyOnClose
- >
- <template #footer>
- <a-button v-if="showFooter" @click="handleCancel" style="margin-left: 8px;">取消</a-button>
- <a-button v-if="showFooter" @click="handlePrint" style="margin-left: 8px;">打印</a-button>
- <a-button v-if="showFooter" type="primary" @click="addNotice" style="margin-left: 8px;" :disabled="!(formState.state=='1')">通知</a-button>
- <a-popconfirm title="确定反馈通知吗?" ok-text="是" cancel-text="否" @confirm="feedbackNotice" @cancel="handleCancelPop('visibleFk')" :visible="visibleFk">
- <a-button v-if="showFooter" type="primary" style="margin-left: 8px;" :disabled="!(formState.state=='2')" @click="()=>visibleFk = true">反馈通知</a-button>
- </a-popconfirm>
- <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push" @cancel="handleCancelPop('visibleTs')" :visible="visibleTs">
- <a-button v-if="showFooter" type="primary" style="margin-left: 8px;" :disabled="!(formState.state=='3'&&!confirmLoading)" @click="()=>visibleTs = true">推送</a-button>
- </a-popconfirm>
- <a-popconfirm title="确定提交吗?" ok-text="是" cancel-text="否" @confirm="end" @cancel="handleCancelPop('visibleTj')" :visible="visibleTj">
- <a-button v-if="showFooter" type="primary" style="margin-left: 8px;" :disabled="!(formState.state=='3'|| formState.state=='4')" @click="()=>visibleTj = true">提交</a-button>
- </a-popconfirm>
- <a-popconfirm title="确定完结吗?" ok-text="是" cancel-text="否" @confirm="finish" @cancel="handleCancelPop('visibleWj')" :visible="visibleWj">
- <a-button v-if="showFooter" type="primary" style="margin-left: 8px;" :disabled="!(formState.state=='5')" @click="()=>visibleWj = true">完结</a-button>
- </a-popconfirm>
- </template>
- <a-spin :spinning="confirmLoading">
- <div class="table-page-search-wrapper" >
- <div>
- <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules" labelAlign="right" class="kk">
- <a-row :gutter="24">
- <a-col :span="8" >
- <a-form-model-item label="日期" prop="accidentData" >
- <a-input v-model="formState.accidentData" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="8" >
- <a-form-model-item label="质量事故单主题" prop="accidentTheme">
- <a-input v-model="formState.accidentTheme" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="8">
- <a-form-model-item label="质量事故单号" prop="accidentNumber">
- <a-input v-model="formState.accidentNumber" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="8" >
- <a-form-model-item label="客户" prop="customer" >
- <a-input v-model="formState.customer" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="8" >
- <a-form-model-item label="工厂(事故发生地)" prop="factory">
- <a-input v-model="formState.factory" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="8" >
- <a-form-model-item label="责任单位" prop="responsibilityCompany">
- <a-input v-model="formState.responsibilityCompany" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
-
- </a-row>
- <a-divider />
- <a-row :gutter="24">
- <a-col :span="6" >
- <a-form-model-item label="责任人1" prop="responsibilityPerson1" >
- <j-search-select-tag v-model="formState.responsibilityPerson1" placeholder=""
- dict="sys_user,realname,username" @search="searchName" :disabled="true" />
- </a-form-model-item>
- </a-col>
- <a-col :span="6" >
- <a-form-model-item label="责任人2" prop="responsibilityPerson2" >
- <j-search-select-tag v-model="formState.responsibilityPerson2" placeholder=""
- dict="sys_user,realname,username" @search="searchName" :disabled="true" />
- </a-form-model-item>
- </a-col>
- <a-col :span="6" >
- <a-form-model-item label="责任人3" prop="responsibilityPerson3">
- <j-search-select-tag v-model="formState.responsibilityPerson3" placeholder=""
- dict="sys_user,realname,username" @search="searchName" :disabled="true" />
- </a-form-model-item>
- </a-col>
- <a-col :span="6">
- <a-form-model-item label="责任人4" prop="responsibilityPerson4">
- <j-search-select-tag v-model="formState.responsibilityPerson4" placeholder=""
- dict="sys_user,realname,username" @search="searchName" :disabled="true" />
- </a-form-model-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="6" >
- <a-form-model-item label="金额1" prop="sum1" >
- <a-input v-model="formState.sum1" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="6" >
- <a-form-model-item label="金额2" prop="sum2" >
- <a-input v-model="formState.sum2" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="6" >
- <a-form-model-item label="金额3" prop="sum3">
- <a-input v-model="formState.sum3" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="6">
- <a-form-model-item label="金额4" prop="sum4" >
- <a-input v-model="formState.sum4" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- </a-row>
- <a-divider />
- <a-row :gutter="24">
- <!-- <a-col :span="8" >
- <a-form-model-item label="币种" prop="moneyType">
- <a-input v-model="formState.moneyType" placeholder="请输入" readOnly></a-input>
- </a-form-model-item>
- </a-col> -->
- <a-col :span="8" >
- <a-form-model-item label="总金额" prop="totalMoney" >
- <a-input v-model="formState.totalMoney" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="8" >
- <a-form-model-item label="业务类型" prop="businessType">
- <a-input v-model="formState.businessType" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
-
- </a-row>
- <a-row :gutter="24">
- <a-col :span="8" >
- <a-form-model-item label="成衣销售订单号" prop="garmentSalesOrder">
- <a-input v-model="formState.garmentSalesOrder" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="8" >
- <a-form-model-item label="款号" prop="styleNumber" >
- <a-input v-model="formState.styleNumber" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="8" >
- <a-form-model-item label="物料" prop="material">
- <a-input v-model="formState.material" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
-
- </a-row>
- <a-row :gutter="24">
- <a-col :span="8" >
- <a-form-model-item label="计划员" prop="planPersonnel">
- <a-input v-model="formState.planPersonnel" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="8" >
- <a-form-model-item label="业务员" prop="businessPeople" >
- <j-search-select-tag v-model="formState.businessPeople" placeholder=""
- dict="sys_user,realname,username" @search="searchName" :disabled="true" />
- </a-form-model-item>
- </a-col>
- <a-col :span="8" >
- <a-form-model-item label="QC" prop="qualityControl">
- <j-search-select-tag v-model="formState.qualityControl" placeholder=""
- dict="sys_user,realname,username" @search="searchName" :disabled="true" />
- </a-form-model-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="24" style="height: 290px;">
- <a-form-model-item label="情况说明" prop="presentationCondition" class="fff">
- <a-textarea v-model="formState.presentationCondition" type="textarea" placeholder="请输入" readOnly></a-textarea>
- <!-- <a-input v-model="formState.presentationCondition" type="textarea" placeholder="请输入" readOnly ></a-input> -->
- </a-form-model-item>
- </a-col>
- </a-row>
-
- </a-form-model>
- </div>
- <!-- 子表单区域 -->
- <!-- <a-button type="primary" @click="addList" style="margin-bottom: 1%;">增行</a-button> -->
- <a-table
- bordered
- :columns="incidentTicketChildrenTable.columns"
- :data-source="incidentTicketChildrenTable.dataSource"
- :loading="incidentTicketChildrenTable.loading"
- :scroll="{x: 1500,y:300 }"
- :pagination="false"
- >
- <!-- 汇率 -->
- <span slot="exchangeRate" slot-scope="text, record, index">
- <a-input placeholder="请输入" v-model="record.exchangeRate" />
- </span>
- <!-- 实际事故金额 -->
- <span slot="practicalSum" slot-scope="text, record, index">
- <a-input placeholder="请输入" v-model="record.practicalSum" />
- </span>
- <!-- U8生成运费发票号 -->
- <span slot="u8Invoice" slot-scope="text, record, index">
- <a-input placeholder="请输入" v-model="record.u8Invoice" />
- </span>
- <!-- 账套号 -->
- <span slot="zhanghaoId" slot-scope="text, record, index">
- <a-input placeholder="请输入" v-model="record.zhanghaoId" />
- </span>
- <!-- 备注 -->
- <span slot="remark" slot-scope="text, record, index">
- <a-input placeholder="请输入" v-model="record.remark" />
- </span>
- </a-table>
- <!-- 主表单区域 -->
- <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules">
- <a-row :gutter="24">
- <a-col :span="12" >
- <a-form-model-item label="附件上传" prop="accessory" class="ff">
- <j-upload v-model="accessory" :disabled="true"></j-upload>
- </a-form-model-item>
- </a-col>
- <a-col :span="12" >
- <a-form-model-item label="工厂签章" prop="factorySignature" class="ff">
- <j-upload v-model="factorySignature" :disabled="true"></j-upload>
- </a-form-model-item>
- </a-col>
-
- </a-row>
- <a-row :gutter="24">
- <a-col :span="24" style="height: 230px;">
- <a-form-model-item label="财务备注" prop="financeRemark" class="caiwu">
- <a-input v-model="formState.financeRemark" type="textarea" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12" >
- <a-form-model-item label="财务添加附件" prop="accessory2" class="ff ">
- <j-upload v-model="accessory2" ></j-upload>
- </a-form-model-item>
- </a-col>
-
-
- </a-row>
- <a-row :gutter="24">
- <a-col :span="18">
- <a-form-model-item label="通知人" prop="Noticer">
- <a-input v-model="formState.Noticer" placeholder="请输入" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="6">
- <a-form-model-item label="通知时间" prop="Noticer">
- <a-input v-model="formState.createTime" placeholder="请输入" readOnly></a-input>
- </a-form-model-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
-
- <a-col :span="6">
- <a-form-model-item label="U8订单备注" prop="orderRemarks">
- <a-input v-model="formState.orderRemarks" placeholder="请输入" readOnly></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="6">
- <a-form-model-item label="U8开票日期" prop="orderRemarks">
- <a-date-picker
- placeholder="请选择"
- format="YYYY-MM-DD"
- style="width: 100%"
- v-model="formState.invoicingDate"
- disabled="true"
- />
- </a-form-model-item>
- </a-col>
- <a-col :span="6" >
- <a-form-model-item label="填报人" prop="informant">
- <a-input v-model="formState.informant" placeholder="请输入" readOnly ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="6" >
- <a-form-model-item label="部门" prop="department">
- <a-input v-model="formState.department" placeholder="请输入" readOnly></a-input>
- </a-form-model-item>
- </a-col>
-
- </a-row>
- </a-form-model>
- <j-select-biz-component ref="JSelectBizComponent" @send-notice="sendNotice" :multi="true" />
- </div>
- </a-spin>
- <!-- 打印 -->
- <div class="col-md-6 column" style="display: none;" id="printBox">
- <h1 style="text-align: center;">质量事故处理单</h1>
- <table class="table table-bordered" style="border:2px solid #999">
- <thead>
- </thead>
- <tbody>
- <tr>
- <td class="tdOne">日期</td>
- <td class="tdTwo"> {{ formState.accidentData }}</td>
- <td class="tdOne">质量事故单号</td>
- <td class="tdTwo">{{ formState.accidentNumber }}</td>
- <td class="tdOne">质量事故主题</td>
- <td class="tdTwo">{{ formState.accidentTheme }}</td>
- </tr>
- <tr>
- <td class="tdOne">客户</td>
- <td class="tdTwo" >{{formState.customer }}</td>
- <td class="tdOne">工厂</td>
- <td class="tdTwo" >{{ formState.factory}}</td>
- <td class="tdOne">责任单位</td>
- <td class="tdTwo" >{{ formState.responsibilityCompany }}</td>
- </tr>
- <tr>
- <td class="tdOne">责任人1</td>
- <td class="tdOne">{{ formState.responsibilityPerson1 }}</td>
- <td class="tdOne">责任人2</td>
- <td class="tdOne">{{ formState.responsibilityPerson2 }}</td>
- <td class="tdOne">责任人3</td>
- <td class="tdOne">{{ formState.responsibilityPerson3 }}</td>
- </tr>
- <tr>
- <td class="tdOne">金额1</td>
- <td class="tdOne">{{ formState.sum1 }}</td>
- <td class="tdOne">金额2</td>
- <td class="tdOne">{{ formState.sum2 }}</td>
- <td class="tdOne">金额3</td>
- <td class="tdOne">{{ formState.sum3 }}</td>
- </tr>
- <tr>
- <td class="tdOne">总金额</td>
- <td class="tdOne">{{ formState.totalMoney }}</td>
- <td class="tdOne">业务类型</td>
- <td class="tdOne">{{ formState.businessType }}</td>
- <td class="tdOne"></td>
- <td class="tdOne"></td>
- </tr>
- <tr>
- <td class="tdOne">成衣销售订单号</td>
- <td class="tdOne">{{ formState.garmentSalesOrder }}</td>
- <td class="tdOne">款号</td>
- <td class="tdOne">{{ formState.styleNumber }}</td>
- <td class="tdOne">物料</td>
- <td class="tdOne">{{ formState.material }}</td>
- </tr>
- <tr>
- <td class="tdOne">计划员</td>
- <td class="tdOne">{{ formState.planPersonnel }}</td>
- <td class="tdOne">业务员</td>
- <td class="tdOne">{{ formState.businessPeople }}</td>
- <td class="tdOne">QC</td>
- <td class="tdOne">{{ formState.qualityControl }}</td>
- </tr>
- <tr style="height: 50px;">
- <td class="tdOne" rowspan="3">情况说明</td>
- <td class="tdOne" colspan="5" rowspan="3" style="text-align: left;padding-left: 1%;">
- <textarea style="width: 100%;border: none;overflow: hidden;" readOnly>{{ formState.presentationCondition }}</textarea>
- <!-- {{ formState.presentationCondition }} -->
- </td>
- </tr>
- </tbody>
- </table>
- <table class="table table-bordered" style="margin-top: 2%;border:2px solid #999">
- <thead>
- <th>计划单号</th>
- <th>事故类型</th>
- <th>币种</th>
- <th>事故金额</th>
- <th>汇率</th>
- <th>实际事故金额</th>
- <th>U8生成运费发票号</th>
- <th>账套号</th>
- <th>备注</th>
- </thead>
- <tbody>
- <tr v-for="(item, key) in incidentTicketChildrenTable.dataSource">
- <td>{{item.planNumber}}</td>
- <td>{{item.accidentType}}</td>
- <td>{{item.moneyType}}</td>
- <td>{{item.accidentSum}}</td>
- <td>{{item.exchangeRate}}</td>
- <td>{{item.practicalSum}}</td>
- <td>{{item.u8Invoice}}</td>
- <td>{{item.zhanghaoId}}</td>
- <td>{{item.remark}}</td>
-
- </tr>
- </tbody>
- </table>
- <table class="table table-bordered" style="margin-top: 2%;border:2px solid #999">
- <thead>
- </thead>
- <tbody>
- <tr style="height: 50px;">
- <td class="tdOne" style="width: 1%;">财务备注</td>
- <td class="tdOne" colspan="7" style="text-align: left;padding-left: 1%;">
- <textarea style="width: 100%;border: none;overflow: hidden;" readOnly>{{ formState.financeRemark }}</textarea>
- <!-- {{ formState.financeRemark }} -->
- <!-- <input type="text" v-text="formState.financeRemark" /> -->
- </td>
- </tr>
- </tbody>
- </table>
- <div style="width:100%;display: flex;justify-content: space-around;margin-top: 2%;">
- <span style="">填报人:{{ formState.informant }}</span>
- <span style="margin-left: 30%;">通知人:{{ formState.Noticer }}</span>
- </div>
- <div style="width:100%;justify-content: space-around;margin-right: 2%;">
- <img ghost style="margin-left: 50%;" width="340px" height="160px"
- src="http://www.myfitt.cn:18087/jeecg-boot/sys/common/static/temp/20230310100319_1678417947827.png"/>
- </div>
-
- </div>
- </a-modal>
- </template>
- <script>
- import JSelectBizComponent from './JSelectUserByDepModal'
- import pick from 'lodash.pick'
- import { FormTypes,getRefPromise } from '@/utils/JEditableTableUtil'
- import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
- import { validateDuplicateValue } from '@/utils/util'
- import JDictSelectTag from "@/components/dict/JDictSelectTag"
- import { putAction,getAction } from '@/api/manage'
- import JUpload from '@/components/jeecg/JUpload'
- import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
- import moment from 'moment'
-
- export default {
- name: 'IncidentTicketModalDetail',
- mixins: [JEditableTableMixin],
- components: {
- JDictSelectTag,
- JSelectBizComponent,
- JUpload,
- JSearchSelectTag,
- moment
- },
- data() {
- return {
- labelCol: {
- span: 8
- },
- wrapperCol: {
- span: 16
- },
- labelCol2: {
- span: 3
- },
- wrapperCol2: {
- span: 20
- },
- formState:{},
- confirmLoading:false,
- visibleFk:false,
- visibleTs:false,
- visibleTj:false,
- visibleWj:false,
- visible:false,
- showFooter:false,
- apply:'',
- accessory2:[],
- accessory:[],
- factorySignature:[],
- columns: [
- { title: '姓名', align: 'center', width: '20%', widthRight: '70%', dataIndex: 'realname' },
- { title: '账号', align: 'center', width: '20%', dataIndex: 'username' },
- { title: '电话', align: 'center', width: '23%', dataIndex: 'phone' },
- { title: '出生日期', align: 'center', width: '23%', dataIndex: 'birthday' }
- ],
- multi:true,
- // 新增时子表默认添加几行空数据
- addDefaultRowNum: 1,
- validatorRules: {
- accidentData: {rules: [
- ]},
- accidentTheme: {rules: [
- ]},
- accidentPersonLiable: {rules: [
- ]},
- supplier: {rules: [
- ]},
- personLiable: {rules: [
- ]},
- accidentNumber: {rules: [
- ]},
- customer: {rules: [
- ]},
- factory: {rules: [
- ]},
- responsibilityPerson1: {rules: [
- ]},
- responsibilityPerson2: {rules: [
- ]},
- responsibilityPerson3: {rules: [
- ]},
- responsibilityPerson4: {rules: [
- ]},
- responsibilityPerson5: {rules: [
- ]},
- sum1: {rules: [
- ]},
- sum2: {rules: [
- ]},
- sum3: {rules: [
- ]},
- sum4: {rules: [
- ]},
- sum5: {rules: [
- ]},
- responsibilityCompany: {rules: [
- ]},
- moneyType: {rules: [
- ]},
- totalMoney: {rules: [
- ]},
- businessType: {rules: [
- ]},
- garmentSalesOrder: {rules: [
- ]},
- styleNumber: {rules: [
- ]},
- material: {rules: [
- ]},
- planPersonnel: {rules: [
- ]},
- businessPeople: {rules: [
- ]},
- qualityControl: {rules: [
- ]},
- planNumber: {rules: [
- ]},
- accidentType: {rules: [
- ]},
- accidentSum: {rules: [
- ]},
- presentationCondition: {rules: [
- ]},
- accessory: {rules: [
- ]},
- informant: {rules: [
- ]},
- factorySignature: {rules: [
- ]},
- financeRemark: {rules: [
- ]},
- accessory2: {rules: [
- ]},
- isLeaders: {rules: [
- ]},
- incidentTicketId: {rules: [
- ]},
- tableNameChildren: {rules: [
- ]},
- },
- refKeys: ['incidentTicketChildren', ],
- tableKeys:['incidentTicketChildren', ],
- activeKey: 'incidentTicketChildren',
- // 森_工厂质量事故单-子表
- incidentTicketChildrenTable: {
- loading: false,
- dataSource: [],
- columns: [
- {
- title:'序号',
- align:"center",
- ellipsis: true,
- dataIndex: 'sort',
- customRender: (text) => {
- return Number(text)+1;
- },
- width:'4%'
- },
- {
- title: '计划单号',
- align: "center",
- dataIndex: 'planNumber',
- width: '7%',
- // scopedSlots: { customRender: 'planNumber' },
- },
- {
- title: '事故类型',
- align: "center",
- dataIndex: 'accidentType',
- width: '7%',
- // scopedSlots: { customRender: 'accidentType' },
- },
- {
- title: '币种',
- align: "center",
- dataIndex: 'moneyType',
- width: '7%',
- // scopedSlots: { customRender: 'accidentType' },
- },
- {
- title: '事故金额',
- align: "center",
- dataIndex: 'accidentSum',
- width: '7%',
- // scopedSlots: { customRender: 'accidentSum' },
- },
- {
- title: '汇率',
- align: "center",
- dataIndex: 'exchangeRate',
- width: '9%',
- // scopedSlots: { customRender: 'exchangeRate' },
- },
- {
- title: '实际事故金额',
- align: "center",
- dataIndex: 'practicalSum',
- width: '7%',
- // scopedSlots: { customRender: 'practicalSum' },
- },
- {
- title: 'U8生成运费发票号',
- align: "center",
- dataIndex: 'u8Invoice',
- width: '9%',
- // scopedSlots: { customRender: 'u8Invoice' },
- },
- {
- title: '账套号',
- align: "center",
- dataIndex: 'zhanghaoId',
- width: '9%',
- // scopedSlots: { customRender: 'zhanghaoId' },
- },
-
- {
- title: '备注',
- align: "center",
- dataIndex: 'remark',
- width: '16%',
- // scopedSlots: { customRender: 'remark' },
- },
- ]
- },
- url: {
- add: "/oa/incidentTicket/add",
- edit: "/oa/incidentTicket/edit",
- incidentTicketChildren: {
- list: '/oa/incidentTicket/queryIncidentTicketChildrenByMainId'
- },
- list:'/sys/user/list'
- }
- }
- },
- created() {
- var ccode = this.$route.query.id;
- if (ccode != undefined && ccode != ""){
- this.visible=true
- this.showFooter=false
- this.getHeaderList(ccode)
- }
- },
- methods: {
- addNotice(){
- // this.$refs.JSelectBizComponent.visible = true
- this.$refs.JSelectBizComponent.showModal()
- },
- feedbackNotice(){
- this.visibleFk =false
- getAction('/oa/incidentTicket/noticeUserReturn', {headId:this.formState.id,title:this.formState.accidentTheme,code:this.formState.accidentNumber}).then((res) => {
- if(res.success){
- this.$message.success(res.message)
- this.getNotifier(this.formState.id)
- this.formState.state='3'
- this.$forceUpdate()
- }else{
- this.$message.warning(res.message)
- }
- })
- },
- push(){
- this.visibleTs = false
- var pushOk = 'yes'
- this.incidentTicketChildrenTable.dataSource.every(item=>{
- if(item.zhanghaoId==''||!item.zhanghaoId){
- this.$message.warning('请选择账套号!')
- pushOk = 'no'
- return false;
- }
- return true
- })
- if(pushOk=='yes'){
- this.confirmLoading = true
- getAction('/oa/incidentTicket/propelling', {headId:this.formState.id}).then((res) => {
- if(res.success){
- this.$message.success(res.message)
- this.handleCancel()
- this.confirmLoading = false
- }else{
- this.$message.warning(res.message)
- this.confirmLoading = false
- }
- })
- }
- },
- end(){
- this.visibleTj = false
- getAction('/oa/incidentTicket/endOrder', {headId:this.formState.id}).then((res) => {
- if(res.success){
- this.$message.success(res.message)
- this.handleCancel()
- }else{
- this.$message.warning(res.message)
- }
- })
- },
- finish(){
- this.visibleWj = false
- getAction('/oa/incidentTicket/endOrderReal', {headId:this.formState.id}).then((res) => {
- if(res.success){
- this.$message.success(res.message)
- this.handleCancel()
- }else{
- this.$message.warning(res.message)
- }
- })
- },
- sendNotice(ids){
- getAction('/oa/incidentTicket/noticeUser', {ids:ids,headId:this.formState.id,code:this.formState.accidentNumber,title:this.formState.accidentTheme}).then((res) => {
- if(res.success){
- this.$message.success(res.message)
- this.getNotifier(this.formState.id)
- this.formState.state='2'
- this.$forceUpdate()
- }else{
- this.$message.warning(res.message)
- }
- })
- },
- getHeaderList(id){
- getAction('/oa/incidentTicket/queryById', {id:id}).then((res) => {
- if(res.success){
- var zhuId = '' //主表id
- this.formState=res.result //详情
- this.formState=res.result //详情
- this.formState.invoicingDate = (this.formState.invoicingDate!==''&& this.formState.invoicingDate) ?moment(this.formState.invoicingDate):''
-
- this.formState.accidentData = moment( this.formState.accidentData).format('YYYY-MM-DD');
- this.accessory2 = this.formState.accessory2?JSON.parse(this.formState.accessory2):[]
- var accessory2Z =[]
- this.accessory2.map(item=>{
- accessory2Z.push(item.url)
- })
- this.accessory2 = accessory2Z
- this.accessory = this.formState.accessory?JSON.parse(this.formState.accessory):[]
- var accessoryZ=[]
- this.accessory.map(item =>{
- accessoryZ.push(item.url)
-
- })
- this.accessory =accessoryZ
- this.factorySignature = this.formState.factorySignature?JSON.parse(this.formState.factorySignature):[]
- var factorySignatureZ=[]
- this.factorySignature.map(item =>{
- factorySignatureZ.push(item.url)
- })
- this.factorySignature =factorySignatureZ
- //
- zhuId = res.result.id
- this.getTable(zhuId)
- this.getNotifier(zhuId)
- }else{
- this.$message.warning(res.message)
- }
- })
- },
- getTable(id){
- getAction('/oa/incidentTicket/queryIncidentTicketChildrenByMainId', {id:id}).then((res) => {
- if(res.success){
- this.incidentTicketChildrenTable.dataSource = res.result
- }else{
- this.$message.warning(res.message)
- }
- })
- },
- getNotifier(id){
- getAction('/oa/incidentTicketMsg/queryByMainId', {id:id}).then((res) => {
- if(res.success){
- var noticeList =[]
- res.result.map(item=>{
- if(item.confirm != null && item.confirm != '' && item.confirm != '否'){
- noticeList.push(item.userName+'('+item.confirm+')')
- }else{
- noticeList.push(item.userName+'')
- }
-
- })
- this.formState.Noticer = noticeList.toString()
- this.formState.createTime = (res.result[0].createTime!==''&&res.result[0].createTime)? moment(res.result[0].createTime).format('YYYY-MM-DD HH:mm:ss'):''
- this.$forceUpdate()
- }else{
- this.formState.Noticer = ''
- this.formState.createTime=''
- }
- })
- },
- //关闭
- handleCancel(){
- this.incidentTicketChildrenTable.dataSource =[]
- this.formState = {}
- this.visible = false
- this.visibleTj = false
- this.visibleTs = false
- this.visibleFk = false
- this.showFooter=false
- this.$emit('close')
- },
- // 关闭提示框
- handleCancelPop(data){
- if(data=='visibleFk') this.visibleFk = false
- if(data=='visibleTs') this.visibleTs = false
- if(data=='visibleTj') this.visibleTj = false
- if(data=='visibleWj') this.visibleWj = false
- },
- handlePrint(){
- this.$nextTick(() => {
- const html = window.document.getElementById('printBox').innerHTML
- const win = window.open();
- const style = '<style>\n'
- + 'table{width: 100% !important;border-collapse: collapse;border-spacing: 0;overflow-x:hidden;}\n'
- + 'th,td{width:5%;height: 18px;border: 1px solid #999;font-size: 12px;color: #333;max-width:2000px;text-align: center;}\n'
- + 'th{color: #333}\n'
- // +'@media print{@page {size:landscape}}'
- + '</style>';;
- win.document.write(style+html);
- win.focus();
- setTimeout(function(){
- let textArea = win.document.getElementsByTagName('textarea')
- for (let i = 0; i < textArea.length; i++) {
- textArea[i].style.height = 'auto' // 先设置成auto,再设置高度,删除文字的时候高度才会改变
- textArea[i].style.height = textArea[i].scrollHeight+30 + 'px'
- }
- win.print();
- win.close();
- },1000)
-
- })
-
- },
- // getAllTable() {
- // let values = this.tableKeys.map(key => getRefPromise(this, key))
- // return Promise.all(values)
- // },
- /** 调用完edit()方法之后会自动调用此方法 */
- // editAfter() {
- // let fieldval = pick(this.model,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren')
- // this.$nextTick(() => {
- // this.form.setFieldsValue(fieldval)
- // })
- // // 加载子表数据
- // if (this.model.id) {
- // let params = { id: this.model.id }
- // this.requestSubTableData(this.url.incidentTicketChildren.list, params, this.incidentTicketChildrenTable)
- // }
- // },
- /** 整理成formData */
- classifyIntoFormData(allValues) {
- let main = Object.assign(this.model, allValues.formValue)
- return {
- ...main, // 展开
- incidentTicketChildrenList: allValues.tablesValue[0].values,
- }
- },
- validateError(msg){
- this.$message.error(msg)
- },
- popupCallback(row){
- this.form.setFieldsValue(pick(row,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren'))
- },
- }
- }
- </script>
- <style lang="less" scoped>
- /deep/ .ant-table-wrapper{
- margin-bottom: 2%;
- }
- /deep/ .nresume .ant-input{
- height: 100px !important;
- }
- /deep/ .fff .ant-input{
- height: 280px !important;
- }
- /deep/ .caiwu .ant-input{
- height: 226px !important;
- }
- /deep/ .ff .ant-form-item-control {
- display: contents;
- }
- /deep/.table-page-search-wrapper .ant-form-inline .ant-form-item>.ant-form-item-label{
- width: 118px;
- }
- /deep/ .ant-table td {
- white-space: break-spaces !important;
- word-break: break-word;
- }
- </style>
|