|
@@ -2,6 +2,7 @@ import { required, mobileRequired, mobile } from '@/components/template/rules_ve
|
|
import { getBrandList } from '@/api/miniapp'
|
|
import { getBrandList } from '@/api/miniapp'
|
|
import { getClassifyList } from '@/api/goods'
|
|
import { getClassifyList } from '@/api/goods'
|
|
import { goodsMaterialList, goodsMaterialDetail } from '@/api/commercialMaterial.js'
|
|
import { goodsMaterialList, goodsMaterialDetail } from '@/api/commercialMaterial.js'
|
|
|
|
+import { goodsPurchaseDetail, goodsPurchaseItemImportCode } from '@/api/goodsPurchasedStored.js'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -358,49 +359,47 @@ export default {
|
|
render: (h, { row, column, index }) => {
|
|
render: (h, { row, column, index }) => {
|
|
return (
|
|
return (
|
|
<div style="padding:0 6px" class="operation-btns">
|
|
<div style="padding:0 6px" class="operation-btns">
|
|
- {!~['SAVE', 'WAIT', 'OK', 'FAIL'].indexOf(this.formData.status) ? (
|
|
|
|
- [
|
|
|
|
- this.isEditIndex == index ? (
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- onClick={() => {
|
|
|
|
- this.$refs.formRef.validateField(
|
|
|
|
- this.getVfyKey(this.isEditIndex),
|
|
|
|
- (valid, invalidFields, errLabels) => {
|
|
|
|
- if (valid && this.eidtItems()) {
|
|
|
|
- this.isEditIndex = -1
|
|
|
|
|
|
+ {!~['SAVE', 'WAIT', 'OK', 'FAIL'].indexOf(this.formData.status)
|
|
|
|
+ ? [
|
|
|
|
+ this.isEditIndex == index ? (
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ onClick={() => {
|
|
|
|
+ this.$refs.formRef.validateField(
|
|
|
|
+ this.getVfyKey(this.isEditIndex),
|
|
|
|
+ (valid, invalidFields, errLabels) => {
|
|
|
|
+ if (valid && this.eidtItems()) {
|
|
|
|
+ this.isEditIndex = -1
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- )
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- 保存
|
|
|
|
- </el-button>
|
|
|
|
- ) : null,
|
|
|
|
- this.isEditIndex == -1 ? (
|
|
|
|
|
|
+ )
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 保存
|
|
|
|
+ </el-button>
|
|
|
|
+ ) : null,
|
|
|
|
+ this.isEditIndex == -1 ? (
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ onClick={() => {
|
|
|
|
+ this.isEditIndex = index
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 编辑
|
|
|
|
+ </el-button>
|
|
|
|
+ ) : null,
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
onClick={() => {
|
|
onClick={() => {
|
|
- this.isEditIndex = index
|
|
|
|
|
|
+ this.delGoodsInfo(row, index)
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- 编辑
|
|
|
|
|
|
+ 删除
|
|
</el-button>
|
|
</el-button>
|
|
- ) : null,
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- onClick={() => {
|
|
|
|
- this.delGoodsInfo(row, index)
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- 删除
|
|
|
|
- </el-button>
|
|
|
|
- ]
|
|
|
|
- ) : !!~['SAVE'].indexOf(this.formData.status) ? (
|
|
|
|
- <el-button type="text" onClick={() => {}}>
|
|
|
|
- 导入条码
|
|
|
|
- </el-button>
|
|
|
|
- ) : null}
|
|
|
|
|
|
+ ]
|
|
|
|
+ : !!~['SAVE'].indexOf(this.formData.status)
|
|
|
|
+ ? this.importButton(goodsPurchaseItemImportCode, '导入条码', { purchaseItemId: row.id })
|
|
|
|
+ : null}
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|