| | |
| | | method: 'delete', |
| | | data: ids |
| | | }) |
| | | } |
| | | // å¼ç¥¨å°è´¦æä»¶å é¤ |
| | | export function delCommonFileInvoiceLedger(ids) { |
| | | return request({ |
| | | url: '/invoiceLedger/delFile', |
| | | method: 'delete', |
| | | data: ids |
| | | }) |
| | | } |
| | |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column label="å
¥åºæ¶é´" prop="createTime" width="100" show-overflow-tooltip /> |
| | | <!-- <el-table-column label="å
¥åºæ¹æ¬¡" prop="inboundBatches" width="160" show-overflow-tooltip /> --> |
| | | <!-- <!– <el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip />–> --> |
| | | <!--<el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip />--> |
| | | <el-table-column label="产å大类" prop="productCategory" show-overflow-tooltip /> |
| | | <el-table-column label="è§æ ¼åå·" prop="specificationModel" show-overflow-tooltip /> |
| | | <el-table-column label="åä½" prop="unit" width="70" show-overflow-tooltip /> |
| | |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column label="å
¥åºæ¶é´" prop="inboundDate" width="100" show-overflow-tooltip /> |
| | | <!-- <el-table-column label="å
¥åºæ¹æ¬¡" prop="inboundBatches" width="160" show-overflow-tooltip /> --> |
| | | <!-- <el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip /> --> |
| | | <!-- <el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip />--> |
| | | <el-table-column label="产å大类" prop="productCategory" show-overflow-tooltip /> |
| | | <el-table-column label="è§æ ¼åå·" prop="specificationModel" show-overflow-tooltip /> |
| | | <el-table-column label="åä½" prop="unit" width="70" show-overflow-tooltip /> |
| | |
| | | placeholder="è¯·éæ©éè´è®¢åå·" |
| | | clearable |
| | | filterable |
| | | remote |
| | | :remote-method="loadPurchaseOptions" |
| | | :loading="loadingPurchaseOptions" |
| | | @change="handlePurchaseChange" |
| | | :disabled="operationType === 'edit'" |
| | |
| | | <el-table-column label="å¾
å
¥åºæ°é" prop="quantity0" width="100" /> |
| | | <el-table-column label="æ¬æ¬¡å
¥åºæ°é" prop="quantityStock" width="150"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.quantityStock" /> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.quantityStock" @change="() => calculateTotalPrice(scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="ç¨ç(%)" prop="taxRate" width="120" />--> |
| | | <!-- <el-table-column--> |
| | | <!-- label="å«ç¨åä»·(å
)"--> |
| | | <!-- prop="taxInclusiveUnitPrice"--> |
| | | <!-- :formatter="formattedNumber"--> |
| | | <!-- width="150"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- label="å«ç¨æ»ä»·(å
)"--> |
| | | <!-- prop="taxInclusiveTotalPrice"--> |
| | | <!-- :formatter="formattedNumber"--> |
| | | <!-- width="150"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- label="ä¸å«ç¨æ»ä»·(å
)"--> |
| | | <!-- prop="taxExclusiveTotalPrice"--> |
| | | <!-- :formatter="formattedNumber"--> |
| | | <!-- width="150"--> |
| | | <!-- />--> |
| | | <el-table-column label="ç¨ç(%)" prop="taxRate" width="120" /> |
| | | <el-table-column label="åä»·(å
)" prop="unitPrice" width="150"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.unitPrice" @change="() => calculateTotalPrice(scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æ»ä»·(å
)" |
| | | :formatter="formattedNumber" |
| | | prop="totalPrice" |
| | | width="150" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | |
| | | // è®¡ç®æ»ä»· |
| | | const calculateTotalPrice = (row) => { |
| | | const quantityStock = Number(row?.quantityStock ?? 0); |
| | | const unitPrice = Number(row?.unitPrice ?? 0); |
| | | |
| | | if (Number.isFinite(quantityStock) && Number.isFinite(unitPrice)) { |
| | | row.totalPrice = quantityStock * unitPrice; |
| | | } else { |
| | | row.totalPrice = 0; |
| | | } |
| | | }; |
| | | |
| | | const fetchProductsByContract = async () => { |
| | | if (!form.value.purchaseContractNumber) { |
| | | proxy.$modal.msgWarning('è¯·éæ©ååå·') |
| | |
| | | productList.value = productRes.data.map(item => ({ |
| | | ...item, |
| | | quantityStock: 0, |
| | | unitPrice: Number(item?.unitPrice ?? 0), |
| | | totalPrice: 0, |
| | | originalQuantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? 0), |
| | | })) |
| | | } catch (error) { |
| | |
| | | nickName: userStore.nickName, |
| | | details: selectedRows.value.map(product => ({ |
| | | id: product.id, |
| | | inboundQuantity: Number(product.quantityStock) |
| | | inboundQuantity: Number(product.quantityStock), |
| | | unitPrice: Number(product.unitPrice), |
| | | totalPrice: Number(product.totalPrice) |
| | | })), |
| | | }; |
| | | loading.value = true |
| | |
| | | productList.value = res.data.map(item => ({ |
| | | ...item, |
| | | quantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? row.inboundNum ?? 0), |
| | | unitPrice: Number(item?.unitPrice ?? 0), |
| | | totalPrice: Number(item?.quantityStock ?? 0) * Number(item?.unitPrice ?? 0), |
| | | originalQuantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? row.inboundNum ?? 0), |
| | | })) |
| | | selectedRows.value = productList.value |
| | |
| | | <el-input v-model="scope.row.unit" placeholder="请è¾å
¥åä½" /> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="ä¾åºå" prop="supplierName" width="200"> |
| | | <el-table-column label="ä¾åºå" prop="supplierName" width="200"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.supplierName" placeholder="请è¾å
¥ä¾åºå" /> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column label="ç©åç±»å" prop="itemType"> |
| | | </el-table-column> |
| | | <el-table-column label="ç©åç±»å" prop="itemType" width="150"> |
| | | <template #default="scope"> |
| | | <el-select v-model="scope.row.itemType" filterable allow-create placeholder="è¯·éæ©ç©åç±»å" style="width: 100%"> |
| | | <el-option |
| | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å
¥åºæ°é" prop="inboundNum"> |
| | | <el-table-column label="å
¥åºæ°é" prop="inboundNum" width="150"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.inboundNum" @change="() => calculateTotalPrice(scope.row)" /> |
| | | </template> |
| | |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="ç¨ç(%)" prop="taxRate" width="150">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-select v-model="scope.row.taxRate" placeholder="è¯·éæ©ç¨ç" style="width: 100%" @change="() => calculateExclusivePrice(scope.row)">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in taxRateOptions"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- label="å«ç¨åä»·(å
)"--> |
| | | <!-- prop="taxInclusiveUnitPrice"--> |
| | | <!-- width="180"--> |
| | | <!-- >--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveUnitPrice" @change="calculateTotalPrice(scope.row)" />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- label="å«ç¨æ»ä»·(å
)"--> |
| | | <!-- prop="taxInclusiveTotalPrice"--> |
| | | <!-- width="180"--> |
| | | <!-- >--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveTotalPrice" @change="calculateExclusivePrice(scope.row)" />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- label="ä¸å«ç¨æ»ä»·(å
)"--> |
| | | <!-- prop="taxExclusiveTotalPrice"--> |
| | | <!-- width="180"--> |
| | | <!-- >--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxExclusiveTotalPrice" />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="æ°é" prop="quantityStock" width="150"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.quantityStock" @change="() => calculateTotalPrice(scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åä»·(å
)" prop="taxInclusiveUnitPrice" width="150"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveUnitPrice" @change="() => calculateTotalPrice(scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æ»ä»·(å
)" |
| | | prop="taxInclusiveTotalPrice" |
| | | width="150" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="80" v-if="operationType === 'add'"> |
| | | <template #default="scope"> |
| | | <el-button type="danger" size="small" @click="removeProductRow(scope.$index)">å é¤</el-button> |
| | |
| | | itemType: '', |
| | | inboundNum: 0, |
| | | inboundDate: '', |
| | | taxRate: null, |
| | | quantityStock: 0, |
| | | taxInclusiveUnitPrice: 0, |
| | | taxInclusiveTotalPrice: 0, |
| | | taxRate: null, |
| | | taxExclusiveTotalPrice: 0, |
| | | }); |
| | | }; |
| | |
| | | productList.value.splice(index, 1); |
| | | }; |
| | | |
| | | // 计ç®å«ç¨æ»ä»·ï¼æ ¹æ®åä»·åæ°éï¼ |
| | | // è®¡ç®æ»ä»·ï¼æ ¹æ®æ°éãåä»·åå«ç¨åä»·ï¼ |
| | | const calculateTotalPrice = (row) => { |
| | | const unitPrice = Number(row.taxInclusiveUnitPrice || 0); |
| | | const quantity = Number(row.inboundNum || 0); |
| | | row.taxInclusiveTotalPrice = unitPrice * quantity; |
| | | // è®¡ç®æ®éæ»ä»·ï¼quantityStock * taxInclusiveUnitPrice |
| | | const quantity = Number(row.quantityStock || 0); |
| | | const taxInclusiveUnitPrice = Number(row.taxInclusiveUnitPrice || 0); |
| | | row.taxInclusiveTotalPrice = quantity * taxInclusiveUnitPrice; |
| | | calculateExclusivePrice(row); |
| | | }; |
| | | |
| | | // 计ç®ä¸å«ç¨æ»ä»·ï¼æ ¹æ®å«ç¨æ»ä»·åç¨çï¼ |
| | | const calculateExclusivePrice = (row) => { |
| | | const totalPrice = Number(row.taxInclusiveTotalPrice || 0); |
| | | const taxInclusiveTotalPrice = Number(row.taxInclusiveTotalPrice || 0); |
| | | const taxRate = Number(row.taxRate || 0); |
| | | row.taxExclusiveTotalPrice = totalPrice / (1 + taxRate / 100); |
| | | row.taxExclusiveTotalPrice = taxInclusiveTotalPrice / (1 + taxRate / 100); |
| | | }; |
| | | |
| | | const submitForm = async () => { |
| | |
| | | itemType: product.itemType, |
| | | inboundDate: formatDateTime(product.inboundDate, false), |
| | | taxRate: Number(product.taxRate || 0), |
| | | taxInclusiveUnitPrice: Number(product.taxInclusiveUnitPrice || 0), |
| | | taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice || 0), |
| | | taxExclusiveTotalPrice: Number(product.taxExclusiveTotalPrice || 0), |
| | | taxInclusiveUnitPrice: Number(product.taxInclusiveUnitPrice || 0), |
| | | taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice || 0), |
| | | })); |
| | | loading.value = true |
| | | if (operationType.value === 'edit') { |
| | |
| | | itemType: row?.itemType ?? '', |
| | | inboundNum: Number(row?.inboundNum ?? row?.inboundQuantity ?? 0), |
| | | inboundDate: row?.inboundDate ?? row?.createTime ?? '', |
| | | quantityStock: Number(row?.quantityStock ?? 0), |
| | | taxRate: Number(row?.taxRate ?? 0), |
| | | taxInclusiveUnitPrice: Number(row?.taxInclusiveUnitPrice ?? 0), |
| | | taxInclusiveTotalPrice: Number(row?.taxInclusiveTotalPrice ?? 0), |
| | |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <el-table :data="tableData" border v-loading="tableLoading" |
| | | <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange" |
| | | :expand-row-keys="expandedRowKeys" :row-key="row => row.id" show-summary style="width: 100%" |
| | | :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)"> |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column label="å
¥åºæ¶é´" prop="createTime" show-overflow-tooltip /> |
| | | <!-- <el-table-column label="å
¥åºæ¹æ¬¡" prop="inboundBatches" show-overflow-tooltip /> --> |
| | |
| | | <el-table-column label="è§æ ¼åå·" prop="specificationModel" show-overflow-tooltip /> |
| | | <el-table-column label="åä½" prop="unit" width="70" show-overflow-tooltip /> |
| | | <el-table-column label="å
¥åºæ°é" prop="inboundNum" width="90" show-overflow-tooltip /> |
| | | <el-table-column label="åä»·(å
)" prop="unitPrice" width="150"></el-table-column> |
| | | <el-table-column label="æ»ä»·(å
)" prop="totalPrice" width="150"></el-table-column> |
| | | <!-- <el-table-column label="å«ç¨åä»·" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />--> |
| | | <!-- <el-table-column label="å«ç¨æ»ä»·" prop="taxInclusiveTotalPrice" width="100" show-overflow-tooltip />--> |
| | | <!-- <el-table-column label="ç¨ç(%)" prop="taxRate" width="80" show-overflow-tooltip />--> |
| | | <!-- <el-table-column label="ä¸å«ç¨æ»ä»·" prop="taxExclusiveTotalPrice" width="100" show-overflow-tooltip />--> |
| | | <!-- <el-table-column label="å
¥åºäºº" prop="createBy" width="80" show-overflow-tooltip /> --> |
| | | <el-table-column fixed="right" label="æä½" min-width="60" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="openForm('edit', scope.row, 'production');">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper" |
| | | :page="page.current" :limit="page.size" @pagination="paginationChange" /> |
| | |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column label="å
¥åºæ¶é´" prop="createTime" width="100" show-overflow-tooltip /> |
| | | <!-- <el-table-column label="å
¥åºæ¹æ¬¡" prop="inboundBatches" width="160" show-overflow-tooltip /> --> |
| | | <!--<!– <el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip />–>--> |
| | | <el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip /> |
| | | <el-table-column label="产å大类" prop="productCategory" show-overflow-tooltip /> |
| | | <el-table-column label="è§æ ¼åå·" prop="specificationModel" show-overflow-tooltip /> |
| | | <el-table-column label="åä½" prop="unit" width="70" show-overflow-tooltip /> |
| | | <el-table-column label="å
¥åºæ°é" prop="inboundNum" width="90" show-overflow-tooltip /> |
| | | <el-table-column label="åä»·(å
)" prop="unitPrice" width="150"></el-table-column> |
| | | <el-table-column label="æ»ä»·(å
)" prop="totalPrice" width="150"></el-table-column> |
| | | <!--<!– <el-table-column label="å«ç¨åä»·" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />–>--> |
| | | <!--<!– <el-table-column label="å«ç¨æ»ä»·" prop="taxInclusiveTotalPrice" width="100" show-overflow-tooltip />–>--> |
| | | <!--<!– <el-table-column label="ç¨ç(%)" prop="taxRate" width="80" show-overflow-tooltip />–>--> |
| | |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column label="å
¥åºæ¶é´" prop="inboundDate" width="100" show-overflow-tooltip /> |
| | | <!-- <el-table-column label="å
¥åºæ¹æ¬¡" prop="inboundBatches" show-overflow-tooltip /> --> |
| | | <!-- <el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip /> --> |
| | | <!-- <el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip />--> |
| | | <el-table-column label="产å大类" prop="productCategory" show-overflow-tooltip /> |
| | | <el-table-column label="è§æ ¼åå·" prop="specificationModel" show-overflow-tooltip /> |
| | | <el-table-column label="åä½" prop="unit" width="70" show-overflow-tooltip /> |
| | | <el-table-column label="ç©åç±»å" prop="itemType" show-overflow-tooltip /> |
| | | <el-table-column label="å
¥åºæ°é" prop="inboundNum" show-overflow-tooltip /> |
| | | <el-table-column label="åä»·(å
)" prop="taxInclusiveUnitPrice" width="150"></el-table-column> |
| | | <el-table-column label="æ»ä»·(å
)" prop="taxInclusiveTotalPrice" width="150"></el-table-column> |
| | | <!-- <el-table-column label="å«ç¨åä»·" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />--> |
| | | <!-- <el-table-column label="å«ç¨æ»ä»·" prop="taxInclusiveTotalPrice" width="100" show-overflow-tooltip />--> |
| | | <!-- <el-table-column label="ç¨ç(%)" prop="taxRate" width="80" show-overflow-tooltip />--> |
| | |
| | | proxy.$modal.msgWarning('è¯·éæ©æ°æ®') |
| | | return |
| | | } |
| | | |
| | | // æ£æ¥æ¯å¦æä»äººç»´æ¤çæ°æ® |
| | | const unauthorizedData = selectedRows.value.filter(item => item.createBy !== userStore.nickName) |
| | | if (unauthorizedData.length > 0) { |
| | | proxy.$modal.msgWarning("ä¸å¯å é¤ä»äººç»´æ¤çæ°æ®") |
| | | return |
| | | } |
| | | |
| | | const ids = selectedRows.value.map(item => item.id) |
| | | |
| | | ElMessageBox.confirm('éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼', 'å é¤', { |
| | |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | // æ ¹æ®å½å tab ç±»åéæ©ä¸åçå 餿¥å£ |
| | | const deleteApi = activeTab.value === 'manual' ? delStockInCustom : delStockIn |
| | | deleteApi({ ids }).then(() => { |
| | | // æ ¹æ®å½å tab ç±»åéæ©ä¸åçå 餿¥å£åtypeåæ° |
| | | let deleteApi, deleteParams |
| | | |
| | | if (activeTab.value === 'production') { |
| | | // æåå é¤ï¼typeä¼ 2 |
| | | deleteApi = delStockIn |
| | | deleteParams = { ids, type: 2 } |
| | | } else if (activeTab.value === 'purchase') { |
| | | // åæå é¤ï¼typeä¼ 1 |
| | | deleteApi = delStockIn |
| | | deleteParams = { ids, type: 1 } |
| | | } else { |
| | | // ææå
¥åº |
| | | deleteApi = delStockInCustom |
| | | deleteParams = { ids } |
| | | } |
| | | |
| | | deleteApi(deleteParams).then(() => { |
| | | proxy.$modal.msgSuccess("å 餿å") |
| | | getList() |
| | | }).catch(() => { |
| | |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | height="500" |
| | | :page="page" |
| | | @pagination="pagination" |
| | | > |
| | | </PIMTable> |
| | | <pagination |
| | | style="margin: 10px 0" |
| | | v-show="total > 0" |
| | | @pagination="paginationSearch" |
| | | :total="total" |
| | | :page="page.current" |
| | | :limit="page.size" |
| | | /> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0 |
| | | }); |
| | | const total = ref(0); |
| | | const tableData = ref([]); |
| | |
| | | currentId.value = row.id; |
| | | getList() |
| | | } |
| | | const paginationSearch = (obj) => { |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | |
| | | const getList = () => { |
| | | fileListPage({accountId: currentId.value,accountType:accountType.value, ...page}).then(res => { |
| | | tableData.value = res.data.records; |
| | | total.value = res.data.total; |
| | | page.total = res.data.total; |
| | | }) |
| | | } |
| | | // è¡¨æ ¼éæ©æ°æ® |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog v-model="dialogVisible" title="éä»¶" width="50%" :before-close="handleClose"> |
| | | <el-table :data="tableData" border height="40vh"> |
| | | <el-table-column label="éä»¶åç§°" prop="name" min-width="400" show-overflow-tooltip /> |
| | | <el-table-column fixed="right" label="æä½" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">ä¸è½½</el-button> |
| | | <el-button link type="primary" size="small" @click="lookFile(scope.row)">é¢è§</el-button> |
| | | <el-button link type="danger" size="small" @click="handleDelete(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | <filePreview ref="filePreviewRef" /> |
| | | <UploadModal ref="uploadModalRef" @uploadSuccess="handleUploadSuccess" /> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref } from 'vue' |
| | | import { ElMessageBox, ElMessage } from 'element-plus' |
| | | import filePreview from '@/components/filePreview/index.vue' |
| | | import UploadModal from './Modal/UploadModal.vue' |
| | | import { delCommonFileInvoiceLedger} from '@/api/publicApi/commonFile.js' |
| | | |
| | | const dialogVisible = ref(false) |
| | | const tableData = ref([]) |
| | | const currentId = ref('') |
| | | const { proxy } = getCurrentInstance(); |
| | | const filePreviewRef = ref() |
| | | const uploadModalRef = ref() |
| | | |
| | | const handleClose = () => { |
| | | dialogVisible.value = false |
| | | } |
| | | |
| | | const open = (list, id = '') => { |
| | | dialogVisible.value = true |
| | | tableData.value = list |
| | | currentId.value = id |
| | | } |
| | | |
| | | const handleUpload = () => { |
| | | if (!currentId.value) { |
| | | ElMessage.warning('æ æ³è·åå½åè®°å½IDï¼è¯·å
³éåéæ°æå¼éä»¶çªå£') |
| | | return |
| | | } |
| | | uploadModalRef.value.handleImport(currentId.value) |
| | | } |
| | | |
| | | const handleUploadSuccess = (data) => { |
| | | ElMessage.success('ä¸ä¼ æå') |
| | | // è¿éå¯ä»¥æ·»å å·æ°éä»¶å表çé»è¾ |
| | | // ææ¶å
å
³éä¸ä¼ æ¨¡ææ¡ |
| | | } |
| | | |
| | | const downLoadFile = (row) => { |
| | | proxy.$download.name(row.url); |
| | | } |
| | | |
| | | const lookFile = (row) => { |
| | | filePreviewRef.value.open(row.url) |
| | | } |
| | | |
| | | // å é¤éä»¶ |
| | | const handleDelete = (row) => { |
| | | ElMessageBox.confirm(`确认å é¤éä»¶"${row.name}"åï¼`, 'å é¤ç¡®è®¤', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | delCommonFileInvoiceLedger([row.id]).then(() => { |
| | | ElMessage.success('å 餿å') |
| | | // ä»å表ä¸ç§»é¤å·²å é¤çéä»¶ |
| | | const index = tableData.value.findIndex(item => item.id === row.id) |
| | | if (index !== -1) { |
| | | tableData.value.splice(index, 1) |
| | | } |
| | | }).catch(() => { |
| | | ElMessage.error('å é¤å¤±è´¥') |
| | | }) |
| | | }).catch(() => { |
| | | proxy.$modal.msg('已忶å é¤') |
| | | }) |
| | | } |
| | | |
| | | defineExpose({ |
| | | open |
| | | }) |
| | | </script> |
| | | |
| | | <style></style> |
| | |
| | | <el-button link :icon="Files" type="danger"> éä»¶ </el-button> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item |
| | | v-if="row.commonFiles.length !== 0" |
| | | :icon="Download" |
| | | command="download" |
| | | > |
| | | ä¸è½½ |
| | | </el-dropdown-item> |
| | | <el-dropdown-item :icon="Upload" command="upload"> |
| | | ä¸ä¼ |
| | | </el-dropdown-item> |
| | | <el-dropdown-item |
| | | v-if="row.commonFiles.length !== 0" |
| | | :icon="Delete" |
| | | command="delete" |
| | | style="color: #f56c6c;" |
| | | > |
| | | å é¤ |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | |
| | | <template #operation="{ row }"> |
| | | <el-button |
| | | type="primary" |
| | | text |
| | | link |
| | | @click="openEdit(row)" |
| | | > |
| | | ç¼è¾ |
| | | </el-button> |
| | | <el-button link type="primary" size="small" @click="downLoadFile(row)">éä»¶</el-button> |
| | | <el-button |
| | | type="primary" |
| | | text |
| | | link |
| | | @click="handleDelete(row)" |
| | | > |
| | | å é¤ |
| | |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | <FileList ref="fileListRef" /> |
| | | <UploadModal ref="modalRef" @uploadSuccess="uploadSuccess"></UploadModal> |
| | | <EditModal ref="editmodalRef" @success="getTableData"></EditModal> |
| | | </div> |
| | |
| | | import UploadModal from "./Modal/UploadModal.vue"; |
| | | import EditModal from "./Modal/EditModal.vue"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import {delInvoiceLedgerByRegProductId} from "@/api/salesManagement/invoiceLedger.js"; |
| | | import dayjs from "dayjs"; |
| | | const userStore = useUserStore(); |
| | | import FileList from "./fileList.vue"; |
| | | |
| | | defineOptions({ |
| | | name: "æ¥ç¥¨å°è´¦", |
| | |
| | | }, |
| | | { |
| | | fixed: "right", |
| | | width: 150, |
| | | width: 190, |
| | | label: "æä½", |
| | | dataType: "slot", |
| | | slot: "operation", |
| | |
| | | const handleSelectionChange = (val) => { |
| | | multipleVal.value = val; |
| | | }; |
| | | |
| | | //éä»¶ç¸å
³ |
| | | const fileListRef = ref(null) |
| | | //æ¥çéä»¶ |
| | | const downLoadFile = (row) => { |
| | | fileListRef.value.open(row.commonFiles, row.id) |
| | | } |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | |
| | | if (sunqianUser) { |
| | | sunqianUserId.value = sunqianUser.userId; |
| | | } |
| | | // å¨ç¨æ·å表å è½½å®æååå»ºè¡æ°æ® |
| | | tableData.value = [createRow()]; |
| | | // å¨ç¨æ·å表å è½½å®æååå»ºè¡æ°æ®ï¼å¹¶å°äº§çº¿æ°æ®å¸¦å
¥ |
| | | tableData.value = [createRow(row)]; |
| | | }); |
| | | } |
| | | |
| | | const createRow = () => ({ |
| | | const createRow = (row) => ({ |
| | | id: idFromRow.value, |
| | | process: 'å
è£
', |
| | | schedulingDate: '', |
| | |
| | | unit: unitFromRow.value, |
| | | remark: '', |
| | | type: specificationModelFromRow.value, |
| | | productionLine: '', // äº§çº¿åæ®µ |
| | | productionLine: row?.productionLine ?? '', // ä»è¡æ°æ®ä¸è·åäº§çº¿ä¿¡æ¯ |
| | | }); |
| | | |
| | | const submitForm = () => { |
| | |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "产线", |
| | | prop: "productionLine", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "ååå·", |
| | | label: "éå®ååå·", |
| | | prop: "salesContractNo", |
| | | width: 220, |
| | | }, |
| | |
| | | <el-input v-model="form.schedulingNum" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¬æ¬¡ç产æ°éï¼" prop="finishedNum"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¾
ç产æ°éï¼" prop="pendingNum"> |
| | | <el-input v-model="form.pendingNum" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¬æ¬¡ç产æ°éï¼" prop="finishedNum"> |
| | | <el-input-number |
| | | v-model="form.finishedNum" |
| | | placeholder="请è¾å
¥" |
| | |
| | | style="width: 100%" |
| | | @change="changeNum" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åä»·(å
)ï¼" prop="unitPrice"> |
| | | <el-input v-model="form.unitPrice" placeholder="请è¾å
¥" clearable @input="calculateTotalPrice"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¾
ç产æ°éï¼" prop="pendingNum"> |
| | | <el-input v-model="form.pendingNum" placeholder="请è¾å
¥" clearable disabled/> |
| | | <el-form-item label="æ»ä»·(å
)ï¼" prop="totalPrice"> |
| | | <el-input v-model="form.totalPrice" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | finishedNum: "", |
| | | schedulingUserId: "", |
| | | schedulingDate: "", |
| | | unitPrice: "", |
| | | totalPrice: "", |
| | | }, |
| | | rules: { |
| | | schedulingNum: [{ required: true, message: "请è¾å
¥", trigger: "blur" },], |
| | |
| | | proxy.$modal.msgWarning('æ¬æ¬¡ç产æ°éä¸å¯å¤§äºæäº§æ°é') |
| | | } |
| | | form.value.pendingNum = form.value.schedulingNum - form.value.finishedNum; |
| | | calculateTotalPrice(); |
| | | } |
| | | |
| | | // è®¡ç®æ»ä»· |
| | | const calculateTotalPrice = () => { |
| | | const quantity = Number(form.value.finishedNum ?? 0); |
| | | const unitPrice = Number(form.value.unitPrice ?? 0); |
| | | |
| | | if (quantity > 0 && unitPrice > 0) { |
| | | form.value.totalPrice = (quantity * unitPrice).toFixed(2); |
| | | } else { |
| | | form.value.totalPrice = '0.00'; |
| | | } |
| | | } |
| | | // æäº¤äº§å表å |
| | | const submitForm = () => { |
| | |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | height="500" |
| | | :page="page" |
| | | @pagination="pagination" |
| | | > |
| | | </PIMTable> |
| | | <pagination |
| | | style="margin: 10px 0" |
| | | v-show="total > 0" |
| | | @pagination="paginationSearch" |
| | | :total="total" |
| | | :page="page.current" |
| | | :limit="page.size" |
| | | /> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0 |
| | | }); |
| | | const total = ref(0); |
| | | const tableData = ref([]); |
| | |
| | | currentId.value = row.id; |
| | | getList() |
| | | } |
| | | const paginationSearch = (obj) => { |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | |
| | | const getList = () => { |
| | | qualityInspectFileListPage({inspectId: currentId.value}).then(res => { |
| | | tableData.value = res.data.records; |
| | | total.value = res.data.total; |
| | | page.total = res.data.total; |
| | | }) |
| | | } |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 280, |
| | | width: 300, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | height="500" |
| | | :page="page" |
| | | @pagination="pagination" |
| | | > |
| | | </PIMTable> |
| | | <pagination |
| | | style="margin: 10px 0" |
| | | v-show="total > 0" |
| | | @pagination="paginationSearch" |
| | | :total="total" |
| | | :page="page.current" |
| | | :limit="page.size" |
| | | /> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | |
| | | qualityInspectFileDel, |
| | | qualityInspectFileListPage |
| | | } from "@/api/qualityManagement/qualityInspectFile.js"; |
| | | import Pagination from "@/components/PIMTable/Pagination.vue"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | |
| | |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0 |
| | | }); |
| | | const total = ref(0); |
| | | const tableData = ref([]); |
| | |
| | | currentId.value = row.id; |
| | | getList() |
| | | } |
| | | const paginationSearch = (obj) => { |
| | | |
| | | const getList = () => { |
| | | qualityInspectFileListPage({inspectId: currentId.value}).then(res => { |
| | | tableData.value = res.data.records; |
| | | page.total = res.data.total; |
| | | }) |
| | | } |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | qualityInspectFileListPage({inspectId: currentId.value}).then(res => { |
| | | tableData.value = res.data.records; |
| | | total.value = res.data.total; |
| | | }) |
| | | } |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 280, |
| | | width: 300, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | height="500" |
| | | :page="page" |
| | | @pagination="pagination" |
| | | > |
| | | </PIMTable> |
| | | <pagination |
| | | style="margin: 10px 0" |
| | | v-show="total > 0" |
| | | @pagination="paginationSearch" |
| | | :total="total" |
| | | :page="page.current" |
| | | :limit="page.size" |
| | | /> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | |
| | | qualityInspectFileDel, |
| | | qualityInspectFileListPage |
| | | } from "@/api/qualityManagement/qualityInspectFile.js"; |
| | | import Pagination from "@/components/PIMTable/Pagination.vue"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | |
| | |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0 |
| | | }); |
| | | const total = ref(0); |
| | | const tableData = ref([]); |
| | |
| | | currentId.value = row.id; |
| | | getList() |
| | | } |
| | | const paginationSearch = (obj) => { |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | |
| | | const getList = () => { |
| | | qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => { |
| | | tableData.value = res.data.records; |
| | | total.value = res.data.total; |
| | | page.total = res.data.total; |
| | | }) |
| | | } |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 280, |
| | | width: 300, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog v-model="dialogVisible" title="éä»¶" width="40%" :before-close="handleClose"> |
| | | <el-table :data="tableData" border height="40vh"> |
| | | <el-table-column label="éä»¶åç§°" prop="name" min-width="400" show-overflow-tooltip /> |
| | | <el-table-column fixed="right" label="æä½" width="150" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">ä¸è½½</el-button> |
| | | <el-button link type="primary" size="small" @click="lookFile(scope.row)">é¢è§</el-button> |
| | | <el-button link type="danger" size="small" @click="handleDelete(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | <filePreview ref="filePreviewRef" /> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref } from 'vue' |
| | | import { ElMessageBox, ElMessage } from 'element-plus' |
| | | import filePreview from '@/components/filePreview/index.vue' |
| | | import { delCommonFileInvoiceLedger} from '@/api/publicApi/commonFile.js' |
| | | |
| | | const dialogVisible = ref(false) |
| | | const tableData = ref([]) |
| | | const { proxy } = getCurrentInstance(); |
| | | const filePreviewRef = ref() |
| | | const handleClose = () => { |
| | | dialogVisible.value = false |
| | | } |
| | | const open = (list) => { |
| | | dialogVisible.value = true |
| | | tableData.value = list |
| | | } |
| | | const downLoadFile = (row) => { |
| | | proxy.$download.name(row.url); |
| | | |
| | | } |
| | | const lookFile = (row) => { |
| | | filePreviewRef.value.open(row.url) |
| | | } |
| | | // å é¤éä»¶ |
| | | const handleDelete = (row) => { |
| | | ElMessageBox.confirm(`确认å é¤éä»¶"${row.name}"åï¼`, 'å é¤ç¡®è®¤', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | delCommonFileInvoiceLedger([row.id]).then(() => { |
| | | ElMessage.success('å 餿å') |
| | | // ä»å表ä¸ç§»é¤å·²å é¤çéä»¶ |
| | | const index = tableData.value.findIndex(item => item.id === row.id) |
| | | if (index !== -1) { |
| | | tableData.value.splice(index, 1) |
| | | } |
| | | }).catch(() => { |
| | | ElMessage.error('å é¤å¤±è´¥') |
| | | }) |
| | | }).catch(() => { |
| | | proxy.$modal.msg('已忶å é¤') |
| | | }) |
| | | } |
| | | defineExpose({ |
| | | open |
| | | }) |
| | | </script> |
| | | |
| | | <style></style> |
| | |
| | | <el-table-column label="å½å
¥äºº" prop="invoicePerson" show-overflow-tooltip /> |
| | | <el-table-column label="å½å
¥æ¥æ" prop="createTime" show-overflow-tooltip :formatter="formatDate" width="180" /> |
| | | <el-table-column label="å¼ç¥¨æ¥æ" prop="invoiceDate" show-overflow-tooltip width="120" /> |
| | | <el-table-column label="å票" prop="invoiceFileName" width="120" align="center" show-overflow-tooltip fixed="right"> |
| | | <!-- <el-table-column label="å票" prop="invoiceFileName" width="120" align="center" show-overflow-tooltip fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button v-if="scope.row.invoiceFileName" text bg type="primary" |
| | | @click="handleFile(scope.row.commonFiles)"> |
| | |
| | | ä¸ä¼ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | <el-table-column fixed="right" label="æä½" width="150" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="openForm(scope.row)">ç¼è¾</el-button> |
| | | <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">éä»¶</el-button> |
| | | <el-button link type="primary" size="small" @click="delInvoiceLedger(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-form-item label="éä»¶ææï¼" prop="remark"> |
| | | <el-upload v-model:file-list="fileList" :action="upload.url" multiple ref="fileUpload" auto-upload |
| | | :headers="upload.headers" accept=".pdf" :limit="10" :before-upload="handleBeforeUpload" |
| | | :on-error="handleUploadError" :on-success="handleUploadSuccess" :on-remove="handleRemove"> |
| | | :on-error="handleUploadError" :on-success="handleUploadSuccess"> |
| | | <el-button type="primary">ä¸ä¼ </el-button> |
| | | <template #tip> |
| | | <!-- æä»¶æ ¼å¼æ¯æ docï¼docxï¼xlsï¼xlsxï¼pptï¼pptxï¼pdfï¼txtï¼xmlï¼jpgï¼jpegï¼pngï¼gifï¼bmpï¼rarï¼zipï¼7z--> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <FileList ref="fileListRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | commitFile, |
| | | registrationProductPage, |
| | | delInvoiceLedgerByRegProductId, |
| | | } from "../../../api/salesManagement/invoiceLedger.js"; |
| | | } from "@/api/salesManagement/invoiceLedger.js"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import useFormData from "@/hooks/useFormData"; |
| | | import dayjs from "dayjs"; |
| | | import FileList from "./fileList.vue"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const tableData = ref([]); |
| | |
| | | invoiceLedgerProductInfo({ id: row.id }).then((res) => { |
| | | form.value = { ...res.data }; |
| | | fileList.value = res.data.fileList; |
| | | // ä¿åticketRegistrationIdå°è¡¨åæ°æ®ä¸ |
| | | if (row.ticketRegistrationId) { |
| | | form.value.ticketRegistrationId = row.ticketRegistrationId; |
| | | } |
| | | if (!form.value.invoicePerson) { |
| | | form.value.invoicePerson = userStore.nickName; |
| | | // ç§»é¤å½å
¥æ¥æé»è®¤å¼è®¾ç½®ï¼åªå¤çèå´æ¥æå段 |
| | |
| | | }; |
| | | // ä¸ä¼ åæ ¡æ£ |
| | | function handleBeforeUpload(file) { |
| | | console.log("file", file); |
| | | // æ ¡æ£æä»¶å¤§å° |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | proxy.$modal.msgError("ä¸ä¼ æä»¶å¤§å°ä¸è½è¶
è¿10MB!"); |
| | |
| | | proxy.$modal.msgError("æä»¶æ ¼å¼ä¸å¹é
"); |
| | | return false; |
| | | } |
| | | console.log('handleBeforeUpload'); |
| | | proxy.$modal.loading("æ£å¨ä¸ä¼ æä»¶ï¼è¯·ç¨å..."); |
| | | return true; |
| | | } |
| | |
| | | // ä¸ä¼ æååè° |
| | | function handleUploadSuccess(res, file, uploadFiles) { |
| | | proxy.$modal.closeLoading(); |
| | | console.log('handleUploadSuccess'); |
| | | if (res.code === 200) { |
| | | proxy.$refs["fileUpload"].handleRemove(file); |
| | | fileList.value.push(res.data); |
| | | proxy.$modal.msgSuccess("ä¸ä¼ æå"); |
| | | // å°ä¸ä¼ æåçæä»¶ä¿¡æ¯æ·»å å°fileListä¸ |
| | | const fileInfo = { |
| | | name: file.name, |
| | | url: res.data.url || file.response?.data?.url || file.url, |
| | | response: file.response |
| | | }; |
| | | // æ£æ¥æ¯å¦å·²åå¨ç¸åæä»¶ï¼é¿å
é夿·»å |
| | | const existingFileIndex = fileList.value.findIndex(f => f.name === fileInfo.name); |
| | | if (existingFileIndex === -1) { |
| | | fileList.value.push(fileInfo); |
| | | } else { |
| | | fileList.value[existingFileIndex] = fileInfo; |
| | | } |
| | | // ç¡®ä¿è¡¨åæ°æ®ä¸çfileList乿´æ° |
| | | form.value.fileList = fileList.value; |
| | | } else { |
| | | proxy.$modal.msgError(res.msg); |
| | | proxy.$refs.fileUpload.handleRemove(file); |
| | | } |
| | | } |
| | | // ç§»é¤æä»¶ |
| | | function handleRemove(file) { |
| | | let index = fileList.value.findIndex((item) => item.url === file.url); |
| | | if (index > -1) { |
| | | fileList.value.splice(index, 1); |
| | | } |
| | | } |
| | | // æäº¤è¡¨å |
| | |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | |
| | | // æå¼éä»¶ä¸ä¼ å¼¹çª |
| | | const handleDownload = (val) => { |
| | | fileList.value = []; |
| | | uploadModal.value = true; |
| | | currentId.value = val.id; |
| | | }; |
| | | |
| | | // 确认æä»¶ä¸ä¼ |
| | |
| | | getList(); |
| | | }; |
| | | |
| | | //éä»¶ç¸å
³ |
| | | const fileListRef = ref(null) |
| | | //æ¥çéä»¶ |
| | | const downLoadFile = (row) => { |
| | | invoiceLedgerProductInfo({ id: row.id }).then((res) => { |
| | | fileListRef.value.open(res.data.fileList) |
| | | }); |
| | | } |
| | | |
| | | onMounted(() => { |
| | | // 设置å¼ç¥¨æ¥æèå´é»è®¤å¼ä¸ºå½å¤© |
| | | const today = dayjs().format('YYYY-MM-DD'); |
| | |
| | | label="éå®ååå·" |
| | | prop="salesContractNo" |
| | | show-overflow-tooltip |
| | | width="200" |
| | | /> |
| | | <el-table-column |
| | | label="客æ·ååå·" |
| | | prop="customerContractNo" |
| | | width="200" |
| | | show-overflow-tooltip |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- label="客æ·ååå·"--> |
| | | <!-- prop="customerContractNo"--> |
| | | <!-- width="200"--> |
| | | <!-- show-overflow-tooltip--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | label="客æ·åç§°" |
| | | prop="customerName" |
| | | show-overflow-tooltip |
| | | width="240" |
| | | /> |
| | | <el-table-column label="ä¸å¡å" prop="salesman" show-overflow-tooltip width="90"/> |
| | | <el-table-column label="ä¸å¡å" prop="salesman" show-overflow-tooltip/> |
| | | <el-table-column |
| | | label="ååéé¢(å
)" |
| | | prop="contractAmount" |
| | | show-overflow-tooltip |
| | | :formatter="formattedNumber" |
| | | width="220" |
| | | |
| | | /> |
| | | <el-table-column |
| | |
| | | prop="invoiceTotal" |
| | | show-overflow-tooltip |
| | | :formatter="formattedNumber" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="æªå¼ç¥¨éé¢(å
)" |