| | |
| | | <el-select v-model="scope.row.scrappedCode" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in scrapReasonOptions" |
| | | :key="item.dict_value" |
| | | :key="item.dict_code" |
| | | :label="item.dict_label" |
| | | :value="item.dict_value" |
| | | :value="item.dict_code" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | |
| | | </win-md> |
| | | </template> |
| | | <script> |
| | | import { scrappedAdd } from '@/api/stock/scrap'; |
| | | import { |
| | | goodsTemplate, |
| | | selectTenantWarehouse, |
| | | goodsModel, |
| | | warehouseSelectNumber, |
| | | } from '@/api/baseSetting/finsystenant'; |
| | | import { getTree } from '@/api/foudation/classification'; |
| | | import {scrappedAdd} from '@/api/stock/scrap'; |
| | | import {goodsModel, goodsTemplate, selectTenantWarehouse, warehouseSelectNumber,} from '@/api/baseSetting/finsystenant'; |
| | | import {getTree} from '@/api/foudation/classification'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import winMd from '@/components/win/win-md'; |
| | | import upload from '@/components/upload/index'; |
| | | import { getUploadUrl } from '@/utils/base'; |
| | | import { mapGetters } from 'vuex'; |
| | | import SettingIplatform from '../../../../../public/static/config'; |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import {getUploadUrl} from '@/utils/base'; |
| | | import {mapGetters} from 'vuex'; |
| | | import {getDicts} from '@/api/system/dict/data'; |
| | | |
| | | export default { |
| | | components: { MyButton, winMd, upload }, |
| | |
| | | warehouseId: [{ required: true, message: '请选择', trigger: 'change' }], |
| | | dealTime: [{ required: true, message: '请选择', trigger: 'change' }], |
| | | buyType: [{ required: true, message: '请选择', trigger: 'change' }], |
| | | |
| | | uploadFiles: [{ required: true, message: '请上传', trigger: 'change' }], |
| | | baseCategoryIds: [{ required: true, message: '请选择', trigger: 'change' }], |
| | | baseGoodsTemplateId: [{ validator: checkGoodsTemplateId, trigger: ['blur', 'change'] }], |
| | |
| | | title: '上传', |
| | | max: 20, // 最大大小,单位M |
| | | num: 10, // 支持上传图片个数 |
| | | accept: '.jpg,.png', // 限制格式 |
| | | tip: '', // 提示 默认:`只能上传${this.defaultSettings.num}个${this.defaultSettings.accept}文件,且不超过${this.defaultSettings.max}kb` |
| | | uploadUrl: getUploadUrl(), // 上传路径 |
| | | multiple: true, // 是否支持批量上传 |
| | |
| | | this.getWarehouseList(); |
| | | this.getgoodsTemplate(); |
| | | this.getgoodsModel(); |
| | | this.getCategoryTree(); |
| | | await this.getCategoryTree(); |
| | | this.formData.scrappedGoodsInfo.push(JSON.parse(JSON.stringify(this.goodsItem))); |
| | | this.formData.operatorId = this.userInfo.id; |
| | | this.formData.operatorName = this.userInfo.userName; |
| | |
| | | |
| | | // 获取报废仓库列表 |
| | | getWarehouseList() { |
| | | selectTenantWarehouse() |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) |
| | | .then((res) => { |
| | | this.warehouses = res; |
| | | if (this.warehouses.length && !this.formData.warehouseId) { |
| | |
| | | handleSubmit() { |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | console.log('this.formData', this.formData); |
| | | scrappedAdd(this.formData) |
| | | .then((res) => { |
| | | this.$message.success('保存成功!'); |