|
@@ -1,6 +1,6 @@
|
|
|
-<template>
|
|
|
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
|
<div>
|
|
|
- <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="formReadOnly"
|
|
|
+ <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
|
|
|
label-width="100px" @submit.native.prevent>
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
|
|
|
<el-row :gutter="26">
|
|
@@ -35,7 +35,7 @@
|
|
|
:url="`/sys/office/treeData?type=2`"
|
|
|
:value="inputForm.handledByOffice"
|
|
|
:accordion="true"
|
|
|
- size="medium"
|
|
|
+ size="large"
|
|
|
@getValue="(value) => {inputForm.handledByOffice=value}"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -46,6 +46,7 @@
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
style="width: 100%"
|
|
|
+ placement="bottom-start"
|
|
|
placeholder="选择日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -53,19 +54,11 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="采购编号" prop="purchaseNo"
|
|
|
:rules="[]">
|
|
|
- <el-input size="medium" :readonly="true" @focus="openContractForm()" v-model="inputForm.purchaseNo" placeholder="请选择采购编号">
|
|
|
+ <el-input :readonly="true" @focus="openContractForm()" v-model="inputForm.purchaseNo" placeholder="请选择采购编号">
|
|
|
<el-button slot="append" icon="el-icon-search" @click="openContractForm()"></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!--<el-col :span="12">
|
|
|
- <el-form-item label="合同编号" prop="contractNo"
|
|
|
- :rules="[]">
|
|
|
- <el-input size="medium" :readonly="true" @focus="openContractChooseForm()" v-model="inputForm.contractNo" placeholder="请选择采购编号">
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="openContractChooseForm()"></el-button>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>-->
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="备注" prop="remarks">
|
|
|
<el-input v-model="inputForm.remarks"
|
|
@@ -80,9 +73,8 @@
|
|
|
</el-row>
|
|
|
|
|
|
<div v-if="commonJS.isNotEmpty(inputForm.purchaseNo)">
|
|
|
- <el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
- <el-link v-if="this.commonJS.isNotEmpty(this.inputForm.purchaseNo)" :underline="false" @click="viewContract(inputForm.purchaseNo)">采购详情</el-link>
|
|
|
- <span v-else>采购详情</span>
|
|
|
+ <el-divider content-position="left" ><i class="el-icon-document" style="font-weight: bold;font-size: 16px;color:#409EFF"></i>
|
|
|
+ <el-link @click="viewContract(inputForm.purchaseNo)"><span style="font-weight: bold;font-size: 16px;color:#409EFF"> 采购详情</span></el-link>
|
|
|
</el-divider>
|
|
|
<el-row :gutter="15" >
|
|
|
<vxe-table
|
|
@@ -93,155 +85,155 @@
|
|
|
ref="detailTable"
|
|
|
class="vxe-table-element"
|
|
|
:data="inputForm.detailInfos"
|
|
|
- style="margin-left: 5em"
|
|
|
- @cell-click=""
|
|
|
- @edit-closed=""
|
|
|
- highlight-current-row
|
|
|
- :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: true, icon: '-'}"
|
|
|
+ style="margin-left: 3em"
|
|
|
>
|
|
|
- <vxe-table-column field="purchaserAgent" title="采购人" :edit-render="{}" :rules="[{required: true, message:'请选择采购人', trigger:'blur'}]">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <el-input :disabled='true' v-model="scope.row.purchaserAgent"></el-input>
|
|
|
- <!-- <el-input v-model="scope.row.purchaser" @focus="userPullListForm(scope.$rowIndex)"></el-input>-->
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column field="procurementOffice" title="采购部门" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <el-input :disabled='true' v-model="scope.row.procurementOffice" ></el-input>
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column field="procurementType" title="采购类型" :edit-render="{}" :rules="[{required: true, message:'请选择采购类型', trigger:'blur'}]">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <el-input :disabled='true' v-model="scope.row.procurementType"></el-input>
|
|
|
- <!-- <el-input v-model="scope.row.procurementType" @focus="typePullForm(scope.$rowIndex)"></el-input>-->
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column field="tradeName" width="250" title="商品名称" :edit-render="{}" :rules="[{required: true, message:'请填写商品名称', trigger:'blur'}]">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <el-input :disabled='true' v-model="scope.row.tradeName"></el-input>
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column field="tradePrice" title="商品单价(元)" :edit-render="{}" :rules="[{required: true, message:'请输入商品单价', trigger:'blur'}]">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <!-- <el-input @change="changeValue" maxlength="15" v-model="scope.row.tradePrice" @keyup.native="scope.row.tradePrice = twoDecimalPlaces(scope.row.tradePrice)"></el-input>-->
|
|
|
- <el-input :disabled='true' @change="changeValue" maxlength="15" v-model="scope.row.tradePrice"></el-input>
|
|
|
- <!-- <el-input @change="changeValue" maxlength="15" v-model="scope.row.tradePrice" @blur="scope.row.tradePrice = twoDecimalPlaces(scope.row.tradePrice)"></el-input>-->
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column field="tradeNumber" title="商品数量" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <!-- <el-input @change="changeValue" v-model="scope.row.tradeNumber" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>-->
|
|
|
- <el-input :disabled='true' @change="changeValue" v-model="scope.row.tradeNumber" maxlength="10"></el-input>
|
|
|
- <!-- <el-input @change="changeValue" v-model="scope.row.tradeNumber" @blur="scope.row.tradeNumber = twoDecimalPlaces2(scope.row.tradeNumber)" maxlength="10"></el-input>-->
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column field="priceSum" title="商品总价" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <el-input :disabled='true' v-model="scope.row.priceSum" maxlength="15"></el-input>
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column field="company" title="单位" :edit-render="{}" :rules="[{required: true, message:'请填写单位', trigger:'blur'}]">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <el-input :disabled='true' v-model="scope.row.company"></el-input>
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column field="remarks" title="备注" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <el-input :disabled='true' v-model="scope.row.remarks" ></el-input>
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column title="操作" width="180">
|
|
|
+ <vxe-column min-width="100" align="center" field="purchaserAgent" title="采购人" ></vxe-column>
|
|
|
+ <vxe-column min-width="100" align="center" field="procurementOffice" title="采购部门" ></vxe-column>
|
|
|
+ <vxe-column min-width="100" align="center" field="procurementType" title="采购类型" ></vxe-column>
|
|
|
+ <vxe-column min-width="220" align="center" field="tradeName" title="商品名称" ></vxe-column>
|
|
|
+ <vxe-column min-width="100" align="center" field="tradePrice" title="商品单价(元)" ></vxe-column>
|
|
|
+ <vxe-column min-width="80" align="center" field="tradeNumber" title="商品数量" ></vxe-column>
|
|
|
+ <vxe-column min-width="100" align="center" field="priceSum" title="商品总价" ></vxe-column>
|
|
|
+ <vxe-column min-width="100" align="center" field="company" title="单位" ></vxe-column>
|
|
|
+ <vxe-column min-width="100" align="center" field="remarks" title="备注" ></vxe-column>
|
|
|
+ <vxe-column align="center" title="操作" fixed="right" width="80">
|
|
|
<template v-slot="scope">
|
|
|
- <el-button size="mini" type="primary" :disabled="false" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</el-button>
|
|
|
+ <el-button size="mini" type="primary" :disabled="false" @click="seeFileInfo(scope.$rowIndex)" plain>附件</el-button>
|
|
|
</template>
|
|
|
- </vxe-table-column>
|
|
|
+ </vxe-column>
|
|
|
</vxe-table>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
入库详情
|
|
|
-<!-- <el-button style="margin-left: 20px" type="primary" @click="insertEvent('detail')" plain>-->
|
|
|
-<!-- 新增-->
|
|
|
-<!-- </el-button>-->
|
|
|
</el-divider>
|
|
|
- <el-row :gutter="15" >
|
|
|
+ <el-row v-if="status === 'audit' || status === 'taskFormDetail'" :gutter="15" >
|
|
|
<vxe-table
|
|
|
border
|
|
|
show-footer
|
|
|
show-overflow
|
|
|
:footer-method="footerMethod2"
|
|
|
- ref="detailTable"
|
|
|
+ ref="detailTableWare"
|
|
|
class="vxe-table-element"
|
|
|
:data="inputForm.wareHouse"
|
|
|
- style="margin-left: 5em"
|
|
|
+ style="margin-left: 3em"
|
|
|
+ :row-class-name="rowClassName"
|
|
|
+ :key="tableKey"
|
|
|
+ >
|
|
|
+ <vxe-column min-width="100px" align="center" field="wareHouseMan" title="入库人">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <span v-if="scope.row.upFlag === '1'"> {{scope.row.wareHouseMan}}(修改前) </span>
|
|
|
+ <span v-else-if="scope.row.upFlag === '2'"> {{scope.row.wareHouseMan}}(已删除) </span>
|
|
|
+ <span v-else-if="scope.row.upFlag === '0' && commonJS.isNotEmpty(scope.row.sourceId)"> {{scope.row.wareHouseMan}}(修改后) </span>
|
|
|
+ <span v-else-if="scope.row.upFlag === '0' && commonJS.isEmpty(scope.row.sourceId)"> {{scope.row.wareHouseMan}} </span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column min-width="100px" align="center" field="wareHouseManOffice" title="入库部门"></vxe-column>
|
|
|
+ <vxe-column min-width="100px" align="center" field="wareHouseType" title="入库类型"></vxe-column>
|
|
|
+ <vxe-column min-width="180px" align="center" field="tradeName" title="商品名称" ></vxe-column>
|
|
|
+ <vxe-column min-width="80px" align="center" field="tradeNumber" title="商品数量" ></vxe-column>
|
|
|
+ <vxe-column min-width="80px" align="center" field="company" title="单位"></vxe-column>
|
|
|
+ <vxe-column min-width="80px" align="center" field="tradePrice" title="商品单价(元)" ></vxe-column>
|
|
|
+ <vxe-column min-width="80px" align="center" field="priceSum" title="商品总价"></vxe-column>
|
|
|
+ <vxe-column min-width="80px" align="center" field="actualPrice" title="实际价格"></vxe-column>
|
|
|
+ <vxe-column min-width="110px" align="center" field="remarks" title="备注"></vxe-column>
|
|
|
+ <vxe-column align="center" fixed="right" title="操作" width="80px">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-button size="mini" type="primary" v-if="scope.row.upFlag !== '1'" :disabled="false" @click="seeFileInfo2(scope.$rowIndex)" plain>附件</el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ </vxe-table>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="15" v-else>
|
|
|
+ <vxe-table
|
|
|
+ border
|
|
|
+ show-footer
|
|
|
+ show-overflow
|
|
|
+ :footer-method="footerMethod2"
|
|
|
+ ref="detailTableWare"
|
|
|
+ class="vxe-table-element"
|
|
|
+ :data="inputForm.wareHouse"
|
|
|
+ style="margin-left: 3em"
|
|
|
@cell-click=""
|
|
|
@edit-closed=""
|
|
|
highlight-current-row
|
|
|
:edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: true, icon: '-'}"
|
|
|
:edit-rules="validRules"
|
|
|
>
|
|
|
- <vxe-table-column align="center" field="wareHouseMan" title="入库人" :edit-render="{}" :rules="[{required: true, message:'请选择入库人', trigger:'blur'}]">
|
|
|
+ <vxe-table-column min-width="100px" align="center" field="wareHouseMan" title="入库人" :edit-render="{}" :rules="[{required: true, message:'请选择入库人', trigger:'blur'}]">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input v-model="scope.row.wareHouseMan" @focus="userPullListForm(scope.$rowIndex)"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column align="center" field="wareHouseManOffice" title="入库部门" :edit-render="{}">
|
|
|
+ <vxe-table-column min-width="100px" align="center" field="wareHouseManOffice" title="入库部门" :edit-render="{}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input :disabled='true' v-model="scope.row.wareHouseManOffice" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column align="center" field="wareHouseType" title="入库类型" :edit-render="{}" :rules="[{required: true, message:'请选择采购类型', trigger:'blur'}]">
|
|
|
+ <vxe-table-column min-width="100px" align="center" field="wareHouseType" title="入库类型" :edit-render="{}" :rules="[{required: true, message:'请选择采购类型', trigger:'blur'}]">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input v-model="scope.row.wareHouseType" @focus="typePullForm(scope.$rowIndex)"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column align="center" field="tradeName" width="250" title="商品名称" :edit-render="{}" :rules="[{required: true, message:'请填写商品名称', trigger:'blur'}]">
|
|
|
+ <vxe-table-column min-width="180px" align="center" field="tradeName" title="商品名称" :edit-render="{}" :rules="[{required: true, message:'请填写商品名称', trigger:'blur'}]">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input @change="ifSameValue" maxlength="64" v-model="scope.row.tradeName"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
|
|
|
- <vxe-table-column align="center" field="tradeNumber" title="商品数量" :edit-render="{}">
|
|
|
+ <vxe-table-column min-width="80px" align="center" field="tradeNumber" title="商品数量" :edit-render="{}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input @change="changeValue2" v-model="scope.row.tradeNumber" @blur="scope.row.tradeNumber = twoDecimalPlaces2(scope.row.tradeNumber)" maxlength="10"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column align="center" field="company" title="单位" :edit-render="{}" :rules="[{required: true, message:'请填写单位', trigger:'blur'}]">
|
|
|
+ <vxe-table-column min-width="80px" align="center" field="company" title="单位" :edit-render="{}" :rules="[{required: true, message:'请填写单位', trigger:'blur'}]">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input maxlength="64" v-model="scope.row.company"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column align="center" field="tradePrice" title="商品单价(元)" :edit-render="{}" :rules="[{required: true, message:'请输入商品单价', trigger:'blur'}]">
|
|
|
+ <vxe-table-column min-width="80px" align="center" field="tradePrice" title="商品单价(元)" :edit-render="{}" :rules="[{required: true, message:'请输入商品单价', trigger:'blur'}]">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input @change="changeValue2" maxlength="15" v-model="scope.row.tradePrice" @blur="scope.row.tradePrice = twoDecimalPlaces2(scope.row.tradePrice)"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column align="center" field="priceSum" title="商品总价" :edit-render="{}">
|
|
|
+ <vxe-table-column min-width="80px" align="center" field="priceSum" title="商品总价" :edit-render="{}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input :disabled='true' v-model="scope.row.priceSum" @blur="scope.row.priceSum = twoDecimalPlaces(scope.row.priceSum)" maxlength="15"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column align="center" field="actualPrice" title="实际价格" :edit-render="{}">
|
|
|
+ <vxe-table-column min-width="80px" align="center" field="actualPrice" title="实际价格" :edit-render="{}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input v-model="scope.row.actualPrice" @blur="scope.row.actualPrice = twoDecimalPlaces(scope.row.actualPrice)" maxlength="15"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
|
|
|
- <vxe-table-column align="center" field="remarks" title="备注" :edit-render="{}">
|
|
|
+ <vxe-table-column min-width="80px" align="center" field="remarks" title="备注" :edit-render="{}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input maxlength="255" v-model="scope.row.remarks" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column align="center" title="操作" width="180">
|
|
|
+ <vxe-table-column align="center" fixed="right" title="操作" width="250px">
|
|
|
<template v-slot="scope">
|
|
|
- <el-button size="mini" type="danger" v-if="!formReadOnly" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</el-button>
|
|
|
- <el-button size="mini" type="primary" v-if="!formReadOnly" @click="sss2(scope.$rowIndex)">上传附件</el-button>
|
|
|
- <el-button size="mini" type="primary" v-if="formReadOnly" :disabled="false" @click="seeFileInfo2(scope.$rowIndex)">查看文件详情</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="updateWareHouse(scope.$rowIndex)">修改</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="sss2(scope.$rowIndex)">上传附件</el-button>
|
|
|
+ <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</el-button>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
</vxe-table>
|
|
|
</el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" style="margin-top: 20px">
|
|
|
+ <el-form-item label="修改原因" prop="updateCause" :rules="[{required: true, message: '修改原因不能为空', trigger: 'blur'}]">
|
|
|
+ <el-input type="textarea"
|
|
|
+ :rows="5"
|
|
|
+ maxlength="500"
|
|
|
+ placeholder="请填写修改原因"
|
|
|
+ show-word-limit
|
|
|
+ v-model="inputForm.updateCause"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
<!-- 附件 -->
|
|
|
<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
|
|
@@ -250,7 +242,6 @@
|
|
|
<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
|
<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
|
|
|
<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
|
|
|
- <ContractChooseForm ref="contractChooseForm" @getProject="getContract3"></ContractChooseForm>
|
|
|
<UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -316,12 +307,15 @@
|
|
|
detailInfos: [],
|
|
|
wareHouse: [],
|
|
|
// amountInfos: [],
|
|
|
- files: [] // 附件信息
|
|
|
+ files: [], // 附件信息
|
|
|
+ functionFlag: '',
|
|
|
+ updateCause: ''
|
|
|
},
|
|
|
- keyWatch: ''
|
|
|
+ keyWatch: '',
|
|
|
+ tableKey: ''
|
|
|
}
|
|
|
},
|
|
|
- WareHouseService: null,
|
|
|
+ wareHouseService: null,
|
|
|
MaterialManagementService: null,
|
|
|
userService: null,
|
|
|
commonApi: null,
|
|
@@ -423,7 +417,9 @@
|
|
|
detailInfos: [],
|
|
|
wareHouse: [],
|
|
|
// amountInfos: [],
|
|
|
- files: [] // 附件信息
|
|
|
+ files: [], // 附件信息
|
|
|
+ functionFlag: '',
|
|
|
+ updateCause: ''
|
|
|
}
|
|
|
if (method === 'add') {
|
|
|
this.title = `新建采购类型`
|
|
@@ -434,47 +430,82 @@
|
|
|
this.visible = true
|
|
|
this.loading = false
|
|
|
this.$nextTick(() => {
|
|
|
- if (this.formReadOnly === true && this.businessId !== 'false') {
|
|
|
+ if (this.status === 'audit' || this.status === 'taskFormDetail') {
|
|
|
method = 'view'
|
|
|
}
|
|
|
if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
|
|
|
this.inputForm.handledByOffice = JSON.parse(localStorage.getItem('user')).officeDTO.id
|
|
|
}
|
|
|
- if (this.status === 'audit' || this.status === 'taskFormDetail') {
|
|
|
- method = 'view'
|
|
|
- }
|
|
|
this.loading = true
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
- this.wareHouseService.findById(this.inputForm.id).then(({data}) => {
|
|
|
- if (this.commonJS.isNotEmpty(data.wareHouseManId)) {
|
|
|
- this.wareHouseManId = data.wareHouseManId
|
|
|
- }
|
|
|
- if (this.commonJS.isNotEmpty(data.wareHouseTypeId)) {
|
|
|
- this.wareHouseTypeId = data.wareHouseTypeId
|
|
|
- }
|
|
|
- this.inputForm = this.recover(this.inputForm, data)
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
|
|
|
- this.inputForm.handledByOffice = JSON.parse(localStorage.getItem('user')).officeDTO.id
|
|
|
- }
|
|
|
- let i = this.inputForm.detailInfos.length
|
|
|
- for (let j = 0; j < i; j++) {
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
|
|
|
- this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
|
|
|
+ this.wareHouseService.findById(this.inputForm.id, this.status).then(({data}) => {
|
|
|
+ this.$refs.uploadComponent.clearUpload()
|
|
|
+ if (data.status === '5' && this.status === 'taskFormDetail') { // 当前正在查询已通过的流程详情页
|
|
|
+ this.wareHouseService.findLastHiByid(this.inputForm.id).then(({data}) => {
|
|
|
+ if (this.commonJS.isNotEmpty(data.wareHouseManId)) {
|
|
|
+ this.wareHouseManId = data.wareHouseManId
|
|
|
+ }
|
|
|
+ if (this.commonJS.isNotEmpty(data.wareHouseTypeId)) {
|
|
|
+ this.wareHouseTypeId = data.wareHouseTypeId
|
|
|
+ }
|
|
|
+ this.inputForm = this.recover(this.inputForm, data)
|
|
|
+ this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.detailInfos)) {
|
|
|
+ let i = this.inputForm.detailInfos.length
|
|
|
+ for (let j = 0; j < i; j++) {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
|
|
|
+ this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.wareHouse)) {
|
|
|
+ let k = this.inputForm.wareHouse.length
|
|
|
+ for (let j = 0; j < k; j++) {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.wareHouse[j].tradePrice)) {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.wareHouse[j].tradeNumber)) {
|
|
|
+ this.inputForm.wareHouse[j].priceSum = this.inputForm.wareHouse[j].tradePrice * this.inputForm.wareHouse[j].tradeNumber
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$refs.uploadComponent.newUpload('view', this.inputForm.files, 'wareHouse')
|
|
|
+ this.loading = false
|
|
|
+ this.tableKey = Math.random()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (this.commonJS.isNotEmpty(data.wareHouseManId)) {
|
|
|
+ this.wareHouseManId = data.wareHouseManId
|
|
|
}
|
|
|
- }
|
|
|
- let k = this.inputForm.wareHouse.length
|
|
|
- for (let j = 0; j < k; j++) {
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.wareHouse[j].tradePrice)) {
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.wareHouse[j].tradeNumber)) {
|
|
|
- this.inputForm.wareHouse[j].priceSum = this.inputForm.wareHouse[j].tradePrice * this.inputForm.wareHouse[j].tradeNumber
|
|
|
+ if (this.commonJS.isNotEmpty(data.wareHouseTypeId)) {
|
|
|
+ this.wareHouseTypeId = data.wareHouseTypeId
|
|
|
+ }
|
|
|
+ this.inputForm = this.recover(this.inputForm, data)
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
|
|
|
+ this.inputForm.handledByOffice = JSON.parse(localStorage.getItem('user')).officeDTO.id
|
|
|
+ }
|
|
|
+ let i = this.inputForm.detailInfos.length
|
|
|
+ for (let j = 0; j < i; j++) {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
|
|
|
+ this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ let k = this.inputForm.wareHouse.length
|
|
|
+ for (let j = 0; j < k; j++) {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.wareHouse[j].tradePrice)) {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.wareHouse[j].tradeNumber)) {
|
|
|
+ this.inputForm.wareHouse[j].priceSum = this.inputForm.wareHouse[j].tradePrice * this.inputForm.wareHouse[j].tradeNumber
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
|
|
|
+ this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
+ this.loading = false
|
|
|
+ this.tableKey = Math.random()
|
|
|
}
|
|
|
- this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
|
|
|
- this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
- this.loading = false
|
|
|
})
|
|
|
if (method !== 'edit' && method !== 'view') {
|
|
|
this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
|
|
@@ -490,7 +521,30 @@
|
|
|
})
|
|
|
},
|
|
|
close () {
|
|
|
+ this.inputForm = {
|
|
|
+ procInsId: '',
|
|
|
+ wareHouseTotalPrice: '', // 入库商品总价
|
|
|
+ wareHouseActualPrice: '', // 入库商品实际价格
|
|
|
+ tradeTotalPrice: '', // 商品总价
|
|
|
+ fileInfoLost: [],
|
|
|
+ purchaseNo: '',
|
|
|
+ handledBy: '',
|
|
|
+ handledById: '',
|
|
|
+ handledByOffice: '',
|
|
|
+ wareHouseName: '',
|
|
|
+ wareHouseNumber: '', // 入库编号
|
|
|
+ userId: '',
|
|
|
+ wareHouseDate: '',
|
|
|
+ remarks: '',
|
|
|
+ detailInfos: [],
|
|
|
+ wareHouse: [],
|
|
|
+ // amountInfos: [],
|
|
|
+ files: [], // 附件信息
|
|
|
+ functionFlag: '',
|
|
|
+ updateCause: ''
|
|
|
+ }
|
|
|
this.method = ''
|
|
|
+ this.inputForm.functionFlag = ''
|
|
|
this.inputForm.detailInfos = []
|
|
|
this.inputForm.wareHouse = []
|
|
|
this.inputForm.amountInfos = []
|
|
@@ -501,7 +555,7 @@
|
|
|
// 新增
|
|
|
async insertEvent (type) {
|
|
|
if (type === 'detail') {
|
|
|
- await this.$refs.detailTable.insert().then((data) => {
|
|
|
+ await this.$refs.detailTableWare.insert().then((data) => {
|
|
|
data.wareHouseManId = this.wareHouseManId
|
|
|
data.wareHouseMan = this.name
|
|
|
data.wareHouseManOffice = this.officeName
|
|
@@ -509,14 +563,10 @@
|
|
|
this.inputForm.wareHouse.push(data)
|
|
|
})
|
|
|
}
|
|
|
- if (type === 'amount') {
|
|
|
- await this.$refs.amountTable.insert().then((data) => {
|
|
|
- this.inputForm.amountInfos.push(data)
|
|
|
- })
|
|
|
- }
|
|
|
},
|
|
|
startForm (callback) {
|
|
|
this.loading = true
|
|
|
+ this.inputForm.functionFlag = 'start'
|
|
|
if (this.commonJS.isNotEmpty(this.inputForm.id)) {
|
|
|
this.wareHouseService.findById(this.inputForm.id).then(({data}) => {
|
|
|
// 审核状态不是“未发起”或“暂存”或“撤回”或“已完成”,就弹出提示
|
|
@@ -573,6 +623,7 @@
|
|
|
this.loading = true
|
|
|
if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
this.loading = false
|
|
|
+ this.inputForm.functionFlag = ''
|
|
|
return
|
|
|
}
|
|
|
if (this.commonJS.isEmpty(this.inputForm.files)) {
|
|
@@ -581,6 +632,7 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.wareHouse)) {
|
|
|
this.$message.error('至少填写一条入库详情信息')
|
|
|
this.loading = false
|
|
|
+ this.inputForm.functionFlag = ''
|
|
|
return
|
|
|
} else {
|
|
|
let i = this.inputForm.wareHouse.length
|
|
@@ -589,11 +641,13 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.wareHouse[j].wareHouseMan)) {
|
|
|
this.$message.error('入库详情第' + k + '行请选择入库人')
|
|
|
this.loading = false
|
|
|
+ this.inputForm.functionFlag = ''
|
|
|
return
|
|
|
}
|
|
|
if (this.commonJS.isEmpty(this.inputForm.wareHouse[j].wareHouseType)) {
|
|
|
this.$message.error('入库详情第' + k + '行请选择入库类型')
|
|
|
this.loading = false
|
|
|
+ this.inputForm.functionFlag = ''
|
|
|
return
|
|
|
}
|
|
|
}
|
|
@@ -602,10 +656,12 @@
|
|
|
this.inputForm.status = '2'
|
|
|
this.wareHouseService.save(this.inputForm).then(({data}) => {
|
|
|
this.inputForm.id = data.businessId
|
|
|
+ this.inputForm.functionFlag = ''
|
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
this.loading = false
|
|
|
}).catch(() => {
|
|
|
+ this.inputForm.functionFlag = ''
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
this.loading = false
|
|
|
})
|
|
@@ -629,11 +685,14 @@
|
|
|
}
|
|
|
this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
this.inputForm.status = '5'
|
|
|
+ this.inputForm.functionFlag = 'agree'
|
|
|
this.wareHouseService.save(this.inputForm).then(({data}) => {
|
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
this.loading = false
|
|
|
+ this.inputForm.functionFlag = ''
|
|
|
}).catch(() => {
|
|
|
this.loading = false
|
|
|
+ this.inputForm.functionFlag = ''
|
|
|
})
|
|
|
} else {
|
|
|
this.loading = false
|
|
@@ -678,8 +737,7 @@
|
|
|
throw new Error()
|
|
|
} else {
|
|
|
// 终止
|
|
|
- let param = {status: '1', id: this.inputForm.id}
|
|
|
- this.wareHouseService.updateStatusById(param).then(() => {
|
|
|
+ this.wareHouseService.backSourceData(this.inputForm.id).then(() => {
|
|
|
this.loading = false
|
|
|
callback()
|
|
|
})
|
|
@@ -871,14 +929,10 @@
|
|
|
// 删除
|
|
|
removeEvent (row, rowIndex, type) {
|
|
|
if (type === 'detail') {
|
|
|
- this.$refs.detailTable.remove(row)
|
|
|
- // this.inputForm.detailInfos.splice(rowIndex, 1)
|
|
|
+ this.$message.success('所选行标记为已删除,保存后生效')
|
|
|
+ this.$refs.detailTableWare.remove(row)
|
|
|
this.inputForm.wareHouse.splice(rowIndex, 1)
|
|
|
}
|
|
|
- if (type === 'amount') {
|
|
|
- this.$refs.amountTable.remove(row)
|
|
|
- this.inputForm.amountInfos.splice(rowIndex, 1)
|
|
|
- }
|
|
|
},
|
|
|
ifSameValue () {
|
|
|
let i = this.inputForm.wareHouse.length
|
|
@@ -895,25 +949,22 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- openContractChooseForm () {
|
|
|
- this.$refs.contractChooseForm.init()
|
|
|
- },
|
|
|
- getContract3 (row) {
|
|
|
- console.log('row', row)
|
|
|
- this.inputForm.contractNo = row.contractNo
|
|
|
- // this.materialManagementService.findById(id).then(({data}) => {
|
|
|
- // this.inputForm.detailInfos = data.detailInfos
|
|
|
- // this.inputForm.purchaseNo = data.purchaseNo
|
|
|
- // let i = this.inputForm.detailInfos.length
|
|
|
- // for (let j = 0; j < i; j++) {
|
|
|
- // if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
|
|
|
- // if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
|
|
|
- // this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
- this.$forceUpdate()
|
|
|
+ // 入库详情修改
|
|
|
+ updateWareHouse (index) {
|
|
|
+ this.$message.success('所选行标记为已修改,保存后生效')
|
|
|
+ this.inputForm.wareHouse[index].upFlag = '1'
|
|
|
+ },
|
|
|
+ // 列表行颜色
|
|
|
+ rowClassName ({ row, rowIndex }) {
|
|
|
+ if (row.upFlag === '1') { // 修改前
|
|
|
+ return 'row-grey'
|
|
|
+ } else if (row.upFlag === '2') { // 已删除
|
|
|
+ return 'row-red'
|
|
|
+ } else if (row.upFlag === '0' && this.commonJS.isNotEmpty(row.sourceId)) { // 修改后
|
|
|
+ return 'row-green'
|
|
|
+ } else if (row.upFlag === '0' && this.commonJS.isEmpty(row.sourceId)) { // 未被修改过的数据
|
|
|
+ return ''
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -923,4 +974,18 @@
|
|
|
font-size: 16px;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
+ /deep/ .row-green {
|
|
|
+ /*background-color: #67c23ad1;*/
|
|
|
+ /*color: #fff;*/
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ /deep/ .row-grey {
|
|
|
+ background-color: #b8b7b7;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ /deep/ .row-red {
|
|
|
+ background-color: #f56c6c66;
|
|
|
+ /*color: #fff;*/
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
</style>
|