|
@@ -181,13 +181,12 @@
|
|
|
icon="el-icon-printer"
|
|
|
size="small"
|
|
|
@click.stop="openReport()"
|
|
|
- >报表打印</el-button
|
|
|
- >
|
|
|
- <el-button type="info" size="small" :disabled="!form.id || form.fudaPurchaseStatus" @click.native="PSModification(1)"
|
|
|
+ >报表打印</el-button>
|
|
|
+ <el-button :type="form.productionScheduling?'success':'info'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 1"
|
|
|
>排产中</el-button>
|
|
|
- <el-button type="info" size="small" :disabled="!form.id || form.productionScheduling" @click.native="PSModification(2)"
|
|
|
+ <el-button :type="form.estimateGoodGoods?'success':'info'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 2"
|
|
|
>预计货好</el-button>
|
|
|
- <el-button type="info" size="small" :disabled="!form.id || form.estimateGoodGoods != '待采购'" @click.native="PSModification(3)"
|
|
|
+ <el-button type="info" size="small" :disabled="!form.id || form.fudaPurchaseStatus != '采购中'" @click.native="dialog = true;fudaSatus = 3"
|
|
|
>采购完成</el-button>
|
|
|
<!-- <el-button-->
|
|
|
<!-- type="warning"-->
|
|
@@ -348,6 +347,27 @@
|
|
|
reportName="客户询价"
|
|
|
@onClose="onClose()"
|
|
|
></report-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="选择日期"
|
|
|
+ :visible.sync="dialog"
|
|
|
+ v-if="dialog"
|
|
|
+ width="30%"
|
|
|
+ append-to-body>
|
|
|
+ <span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="pickerValue"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
+ size="small"
|
|
|
+ value-format="yyyy-MM-dd HH:ss:mm"
|
|
|
+ placeholder="选择日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialog = false;">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="PSModification(fudaSatus)">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -376,10 +396,21 @@ import {
|
|
|
} from "@/util/validate";
|
|
|
import financialAccount from "@/components/finance/financialAccount";
|
|
|
import billApplication from "@/components/bill/billApplication";
|
|
|
+import {dateFormat} from "@/util/date";
|
|
|
export default {
|
|
|
name: "detailsPageEdit",
|
|
|
+ watch:{
|
|
|
+ dialog(newVla, oldVal) {
|
|
|
+ if (newVla){
|
|
|
+ this.pickerValue = dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+ pickerValue:dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
|
|
|
+ dialog:false,
|
|
|
+ fudaSatus:0,
|
|
|
billData: {}, //账单需要数据
|
|
|
financialAccountDialog: false,
|
|
|
applicationDialog: false,
|
|
@@ -647,6 +678,7 @@ export default {
|
|
|
billApplication
|
|
|
},
|
|
|
async created() {
|
|
|
+ return
|
|
|
if (this.detailData.id) {
|
|
|
this.getDetail(this.detailData.id);
|
|
|
}
|
|
@@ -689,6 +721,7 @@ export default {
|
|
|
this.$emit("copyOrder", this.form.id);
|
|
|
},
|
|
|
PSModification(type){
|
|
|
+ if (!this.pickerValue)return this.$message.error("请选择日期")
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '操作中',
|
|
@@ -697,11 +730,19 @@ export default {
|
|
|
});
|
|
|
purchaseStatusUpdate({
|
|
|
id:this.form.id,
|
|
|
- purchaseStatusType:type
|
|
|
+ purchaseStatusType:type,
|
|
|
+ productionSchedulingDate:this.pickerValue,
|
|
|
+ estimateGoodGoodsDate:this.pickerValue,
|
|
|
+ fudaPurchaseDate:this.pickerValue
|
|
|
}).then(res=>{
|
|
|
+ this.getDetail(this.form.id);
|
|
|
this.$message.success("操作成功")
|
|
|
+ this.pickerValue = ''
|
|
|
+ this.dialog = false
|
|
|
loading.close();
|
|
|
}).catch((err)=>{
|
|
|
+ this.pickerValue = ''
|
|
|
+ this.dialog = false
|
|
|
loading.close();
|
|
|
})
|
|
|
},
|
|
@@ -882,8 +923,7 @@ export default {
|
|
|
getDetail(id) {
|
|
|
this.showBut = false;
|
|
|
this.pageLoading = true;
|
|
|
- detail(id)
|
|
|
- .then(res => {
|
|
|
+ detail(id).then(res => {
|
|
|
if (this.detailData.status == "copy") {
|
|
|
delete res.data.data.id;
|
|
|
delete res.data.data.sysNo;
|